- New command
xliffSync.buildWithTranslations
which first builds the project in the currently open workspace/project folder, and directly afterwards synchronizes all .xlf translation files in the workspace/project folder. - New setting
xliffSync.defaultLanguages
that can be used to specify the languages that should automatically be used for the translation file generation. - New setting
xliffSync.buildCommandToExecute
that specifies the build command to execute for thexliffSync.buildWithTranslations
command
- FlorianNoeverGOB for your pull request to add the
xliffSync.buildWithTranslations
command (Pull Request #122)
- New setting
xliffSync.useSelfClosingTags
that can be used to specify whether to use self-closing tags in the XLIFF target translation files. (GitHub issue #97) - Added
LICENSE
file. - Updated
README
with additional references and Contributors section.
- warlof for your pull request (Pull Request #110) which adds the
xliffSync.useSelfClosingTags
setting. - eclipses for reporting GitHub issue #97.
- New setting
xliffSync.parseFromDeveloperNoteTrimCharacters
that can be used to specify the characters to trim from the translations parsed from the developer notes. (GitHub issue #100) - Included
needs-l10n
to be considered as a needs-work state. (GitHub issue #102)
- fvet for your feature request for setting
xliffSync.parseFromDeveloperNoteTrimCharacters
(GitHub issue #100)
- Fixed "Open Externally" no longer working after Visual Studio Code update 1.57.0. This may be a work-around that will be reverted later on. (GitHub issue #89)
- Patch "equivalent languages" feature not allowing to override default value but instead merging the setting values (this was not intended). (GitHub issue #87)
- fvet for reporting the issue with the "equivalent languages" feature (GitHub issue #87)
- dannoe for reporting "Open Externally" no longer working after Visual Studio Code update 1.57.0 (GitHub issue #89) and for your pull request (Pull Request #90).
- Fixed new unit nodes getting
state="translated"
with no translation. Bug due to changes for GitHub issue #67. (GitHub issue #81)
-
Optimized syncing through a preprocessing step that builds up unit maps. The existing implementation approaches O(n^2) while this optimization implemented brings it down to O(n) (with n being the number of translation units). This optimization was already applied earlier in the PowerShell version (see ps-xliff-sync). The new setting
xliffSync.unitMaps
can be used to change whether and to which extent these maps should be used (Default:"All"
). (GitHub issue #31) -
New setting
xliffSync.preserveTargetChildNodes
that can be used to specify whether child nodes specific to the translation target file should be preserved while syncing. Currently this setting will preservealt-trans
nodes and custom nodes for XLIFF 1.2 files. (Default:false
) (GitHub issue #60) -
The extension can now handle units with child nodes (e.g., placeholder tags like
<x/>
) in the target node. (GitHub issue #67) -
New settings
xliffSync.equivalentLanguages
andxliffSync.equivalentLanguagesEnabled
that can be used to specify equivalent languages. You can specify pairs of master language and slave language-pattern (RegEx) in thexliffSync.equivalentLanguages
setting to have the extension copy to contents of the master language's translation file to the translation files of its slave languages. This way you only need to enter the translations for the master language, so that after you sync. again the slave languages will get the same translations, and you don't need to go through all languages files that would get the same translations. For example, oftennl-NL
andnl-BE
would simply get the same translations, so this way you could specify thatnl-BE
should take over all the translations ofnl-NL
. (GitHub issue #74)-
The default value for
xliffSync.equivalentLanguagesEnabled
isfalse
. -
The default value for
xliffSync.equivalentLanguages
is{ "de-DE": "de-.*", "en-US": "en-.*", "es-ES": "es-.*", "fr-FR": "fr-.*", "nl-NL": "nl-.*" }
You can freely customize this, e.g., adding
"en-GB"
as a master language for"(en-AU)|(en-NZ)"
and changing"en-US"
to be a master language for"en-CA"
if you do have differences betweenen-US
anden-GB
in your translations:{ "de-DE": "de-.*", "en-GB": "(en-AU)|(en-NZ)", "en-US": "en-CA", "es-ES": "es-.*", "fr-FR": "fr-.*", "nl-NL": "nl-.*" }
-
-
New setting
xliffSync.keepEditorOpenAfterSync
that can be used to specify whether XLIFF files should be open in the editor after syncing. (Default:true
) -
The technical validation rules now also check that placeholders of the form
#1
match. (GitHub issue #73)
- fvet for requesting support for handling large files. (GitHub issue #31)
- markusguenther for requesting support for preserving
alt-trans
child nodes in target files. (GitHub issue #60) - olalinv for request support for child nodes in target nodes. (GitHub issue #67)
- Activate extension when any of the extension's commands are invoked.
- New setting
xliffSync.matchingOriginalOnly
that can be used to specify whether to sync. only to files where theoriginal
attribute of thefile
-node of an XLIFF file matches that of the base file (Default:true
). (GitHub issue #51 + (GitHub issue #66)) - New setting
xliffSync.clearTranslationAfterSourceTextChange
that can be used to specify whether the translation for trans-units should be cleared during syncing if a change in the source text is detected (instead of marking it as needs-work) (Default:false
). (GitHub issue #64) - Fix: Do not add state to (new) target nodes in XLIFF 2.0 files. (GitHub issue #57)
- Added more details about files and workspace to error messages. (GitHub issue #65)
- antpyykk for filing issue #57.
- catadumitru for filing issue #64.
- waldo1001 for filing issues #65 and #66.
- New setting
xliffSync.addNeedsWorkTranslationNote
that can be used to change whether an "XLIFF Sync" note should be added to trans-units that are being marked as needs-work by the extension (which are added to explain what was detected) (Default:true
). - New setting
xliffSync.openExternallyAfterEvent
that can be used to specify whether translation files should be opened automatically with the default XLIFF editor after an event takes place. By default, files will not be opened externally automatically (Default:[]
). You can set files to be opened externally automatically after:- Checking translations
- Detecting problems
- Synchronizing translation files
- Fix: Do not add
xliffSync.baseFile
setting if there is only a single matching file. - Account for whitespace in missing translation decoration
- Better XLIFF 2.0 support:
state
attribute onsegment
nodes instead of target nodes.state
andsubState
used:needs-translation
->initial
with no sub-stateneeds-adaptation
->translated
with sub-state configurable with settingxliffSync.needsWorkTranslationSubstate
.translated
->translated
with no sub-state.
- Let
xliffSync.fileType
=xlf2
work with file-extensionxlf
. - Fix: function
findXliffSyncNoteIndex
should check for the "category" attribute instead of the "from" attribute. - Fix: function
tryDeleteXliffSyncNote
should callfindXliffSyncNoteIndex
withnotesParent
as argument instead ofunit
. - Fix: function
setXliffSyncNote
should only add a newnotes
node in XLIFF 2.0 files if it does not exist for a unit. - Fix: function
setXliffSyncNote
should callfindXliffSyncNoteIndex
to check if an XLIFF Sync note already exists. - "Check for Need Work Translations" now considers the
xliffSync.needsWorkTranslationSubstate
sub-state. - Decoration is now also applied on
segment
nodes with thexliffSync.needsWorkTranslationSubstate
sub-state.
- New setting
xliffSync.syncCrossWorkspaceFolders
which can be used to set that the extension should synchronize from one single base file (xliffSync.baseFile
) to the translation files in all workspace folders (Default:false
) (GitHub issue #48). - Now, if there are multiple matches for
xliffSync.baseFile
, then the user is prompted to select the base file to use.
- New setting
xliffSync.parseFromDeveloperNoteOverwrite
which when enabled will overwrite existing translations with the translations parsed from the Developer Note. - New setting
xliffSync.copyFromSourceOverwrite
which when enabled will overwrite existing translations with the source text. - The "Parse from Developer Note" feature will now also update translations if
xliffSync.missingTranslation
is configured to something other than the default value (which is missing translation = no translation). - XLIFF Sync snippets for the "Parse from Developer Note" feature.
- You can configure for which programming languages the snippets should be available with setting
xliffSync.enableSnippetsForLanguages
. Currently only the "AL Language" is supported with snippets:tcaptionwithtranslation
,tcommentwithtranslation
,toptioncaptionwithtranslation
,tpromotedactioncategorieswithtranslation
,tlabelwithtranslation
andttooltipwithtranslation
snippets. - You can configure a default target language that should be used by the snippets with setting
xliffSync.snippetTargetLanguage
.
- You can configure for which programming languages the snippets should be available with setting
- New setting
xliffSync.detectSourceTextChanges
(see README) - New setting
xliffSync.ignoreLineEndingTypeChanges
(GitHub issue #41) - New setting
xliffSync.copyFromSourceForLanguages
(GitHub issue #44)
- Only apply decorations in XLIFF files (not in every editor) (GitHub issue #39)
- Reload settings (i.e.,
"xliffSync.decoration"
,"xliffSync.decorationEnabled"
,"xliffSync.decorationTargetTextOnly"
,"xliffSync.missingTranslation"
) when switching active editor - Add new setting
"xliffSync.decorationTargetTextOnly"
to have decorations only be applied to the target node's text, if enabled. - Change highlight-update interval from 1 to 500 (ms)
- Added new setting
xliffSync.parseFromDeveloperNote
(default: false) to have translations parsed from the Developer note if no matching trans-units or translations can be found. Translations can be retrieved from a Developer note in the following format:en-US=My translation|nl-NL=Mijn vertaling
(GitHub issue #37). - Added new setting
xliffSync.parseFromDeveloperNoteSeparator
(default:|
) accompanying settingxliffSync.parseFromDeveloperNote
to change the separator for translations.
- NilsGruettner for requesting the Parse from Developer Note feature. (GitHub issue #37)
- Changed default value for setting
xliffSync.baseFile
to.g.xlf
(GitHub issue #34).
- Added notification that shows that an XLIFF Sync is in progress. This notification includes the name of the target file for which a sync is in progress.
- Added new setting
xliffSync.decorationEnabled
that can be used to disable decoration/highlight of missing translations and translations that need work in XLIFF files.
-
Added the following new technical check (disabled by default):
PlaceholdersDevNote
- Checks that the meaning of placeholders are explained in the Developer note.
-
Added new setting
xliffSync.needWorkTranslationRulesEnableAll
to enable all available technical validation rules. If you want to use all rules including those that will be added in the future, you can use this setting. (Default:false
) -
Fix: The XLIFF Sync note would only be removed for the first trans-unit where a problem is resolved. From now on, the XLIFF Sync note will be removed directly from all trans-units where the problems are detected to be resolved.
-
Fix remove duplicate language tag entry
ja-JP
which shows up callingXLIFF: Create New Target File(s)
. -
Changed
XLIFF: Create New Target File(s)
command adding two options Select multiple.. (to select multiple target languages to create a file) and Enter custom... (to enter a custom target language tag). -
Added the following new technical checks (disabled by default):
ConsecutiveSpacesConsistent
- Checks that the 'consecutive space'-occurrences match in source and translation.ConsecutiveSpacesExist
- Checks whether consecutive spaces exist in the source or translation text.
- fvet for requesting these new rules to be added. (GitHub issue #25)
- pmoison for reporting and explaining your issue which led to the changes to command
XLIFF: Create New Target File(s)
. (GitHub issue #26)
- Added support for multi-root workspaces. You can configure settings per workspace folder. The commands of the extension will run for all workspace folders by default, but if you have a file opened in the editor from a workspace folder, then the commands will only run for the XLIFF files in that workspace folder.
- Added new command
XLIFF: Create New Target File(s)
which can be used to create new target files. If you run this command then you will get a list of language tags for the XLIFF file type that is used in the workspace folder. You can choose one or more language tags from this list, and the command will create new files for the selected languages accordingly. - Small fix in the file-type quick pick list.
- When command
XLIFF: Synchronize to Single File
is run, the check for missing translations and problems will only be run for the single target file whenxliffSync.autoCheckMissingTranslations
and/orxliffSync.autoCheckNeedWorkTranslations
are enabled. Also, these checks won't be run for newly created target files (as they won't have any translations).
- Added new setting
xliffSync.copyFromSourceForSameLanguage
that can be used to specify whether translations should be copied from the source text of trans-units in files for which source-language = target-language. (Default:false
) - Misc. updates in README (clarifications, typo-fixes)
- If a change in the source-text of a trans-unit is detected during synchronization, then the target-node/translation of the trans-unit in the target file will be tagged with
needs-adaptation
. Also an "XLIFF Sync" note will be added to the trans-unit to clarify that a change of the source text was detected. - The count reported by the
XLIFF: Check for Need Work Translations
will now also include the trans-units that were already tagged withneeds-adaptation
(i.e., also including trans-units for which this command does not identify any problems, e.g., manually tagged trans-units).
- fvet for requesting target nodes to be tagged for review when the source text of the trans-unit changes.
- Added new command
XLIFF: Import Translations from File(s)
to import translations based on source and Developer note from external .xlf and .xlf2 files. You can select one more XLIFF files and translations will be merged into trans-units of XLIFF files in the project folder with matching target-language. - Added new setting
xliffSync.replaceTranslationsDuringImport
(accompanying the above command) that can be used to specify whether the import of translations from external XLIFF files should replace/overwrite existing translations. - Added new settings to further customize how trans-units and translations are synchronized:
xliffSync.findByXliffGeneratorNoteAndSource
xliffSync.findBySourceAndDeveloperNote
- Misc. updates in README (e.g., summary, badges)
- Added MIT copyright notices for all authors to sources
- Updated extension logo, adding outline (N.B., to also display nicely in VSCode's Light themes)
- Introduced new setting
xliffSync.needWorkTranslationRules
that can be used which checks need to be run by commandXLIFF: Check for Need Work Translations
. - Added new rule
SourceEqualsTarget
which checks that the source and target are the same for files where source and target language are the same. (GitHub issue #18)
- Fixed bug introduced by refactoring in 0.2.0: default shortcuts blocking clipboard. Also, made shortcuts the same for all operating systems.
- Fixed bug introduced by refactoring in 0.1.6: command
XLIFF: Synchronize to Single File
synchronizing to the wrong file.
- The
XLIFF: Check for Need Work Translations
command now checks for missing placeholders in both directions. (GitHub issue #14) - The "XLIFF Sync" notes added when problems are detected will now automatically be removed when problems are resolved if you run the
XLIFF: Check for Need Work Translations
command again. (GitHub issue #12) - New command
XLIFF: Next Needs Work Translation
: In an XLIFF file that is currently opened in the active editor, search for the next translation tagged asneeds-adaptation
. (GitHub issue #13) - The
XLIFF: Next Missing Translation
command will now check for\<target/\>|\<target\>\</target\>|\<target state="needs-translation"/\>
ifxliffSync.missingTranslation
is set to%EMPTY%
. - Missing translations and translations that need work are now highlighted in the editor. You can change how these are highlighted by changing setting
xliffSync.decoration
. (N.B., if you don't want to have any highlighting, you can set this setting to{}
) - Trigger option checks for trans-units with
Property PromotedActionCategories
as well. (GitHub issue #13) - Fixed bug introduced by refactoring in 0.1.6, missing
await
for creating new target .xlf files. (GitHub issue #16) - Changed default shortcuts, see README.md for details.
- Updated README.md to describe new features and recent changes. Now also includes overview of the checks that are performed when running the
XLIFF: Check for Need Work Translations
command.
- fvet for testing the "Check for Need Work Translations" command and providing feedback.
- Added command and setting to check for translations that have problems and need work. The command
XLIFF: Check for Need Work Translations
will report about files that contain translations that need work and adds notes to describe the detected problem. You can also use settingxliffSync.autoCheckNeedWorkTranslations
to automatically run the checks after syncing. (Default:false
)
- (Addressing GitHub issue #9): Added new settings which change the behaviour on how the extension deals with trans-unit node attributes from the source and target files:
xliffSync.preserveTargetAttributes
: Specifies whether or not the extension should use the attributes from the target files for the trans-unit nodes while syncing. (Default:false
)xliffSync.preserveTargetAttributesOrder
: Specifies whether the attributes of trans-unit nodes should use the order found in the target files while syncing. (Default:false
)
- While syncing translations there is now a check for the "translate" attribute. If translate="no", then the trans-unit node in the target file(s) won't get a new empty target-node. (GitHub issue #8)
- Also, while syncing, if a trans-unit node is found with translate="no" and it has a target-tag (a translation), then it will be deleted from the target file in question. (GitHub issue #8)
- The
XLIFF: Check for Missing Translations
command now also checks for the translate attribute, and won't count trans-unit nodes with translate="no" as missing anymore. (GitHub issue #8) - Fixed bug where only the first occurrence of
\r\n
in elements were replaced with\n
, leading to the issue that the string
would end up in multi-line translations while syncing when it shouldn't. (GitHub issue #7)
- Changed default value of setting "xliffSync.missingTranslation" to
%EMPTY%
. - Changed setting
xliffSync.findByMeaningAndDescription
toxliffSync.findByXliffGeneratorAndDeveloperNote
, andxliffSync.findByMeaning
toxliffSync.findByXliffGeneratorNote
. Also introduced settingsxliffSync.developerNoteDesignation
andxliffSync.xliffGeneratorNoteDesignation
that can be used to customize the designations for note tags that will be used to merge trans-units, if merging/syncing based on ID fails (GitHub issue #6). - Fixed bug in merging translation files based on source tag (N.B., when
xliffSync.findBySource
is set totrue
) (GitHub issue #3). - After running "XLIFF: Check for Missing Translations", show a message if no missing translations were found (GitHub issue #5).
- Added new setting
xliffSync.autoCheckMissingTranslations
that can be used to automatically check for missing translations after syncing (GitHub issue #4).
- Added setting to synchronize translation units based on "source" (disabled by default). Please note that if there are multiple translation units in the target XLIFF file(s) with the same source, then the translation of the first translation unit is used for all new units.
- Added new command "XLIFF: Check for Missing Translations" to the command palette. This command will show an informational message for each XLIFF file with missing translations. From these messages you can also open the XLIFF file(s) with your default XLIFF editor with the *Open Externally button. (GitHub issue #1)
- The command "XLIFF: Next Missing Translation" will now also jump to the next empty translation if setting
xliffSync.missingTranslation
is set to%EMPTY%
. - Updated the README file with screenshots and added setting/command.
- Updated project information (in package.json and README.md)
- Renamed commands
- Add option in the explorer context-menu for XLIFF files, which will do the following (GitHub issue #2):
- In case the base-XLIFF file was selected, then the translation units of the base-XLIFF file will be synced to all other XLIFF files in the workspace.
- In case any file other than the base-XLIFF file was selected, then only the selected file will be synced with the base-XLIFF file.
- Allow empty string for setting "xliffSync.missingTranslation" when using placeholder
%EMPTY%
. - When a new target file is generated, then if the base file ends with
g.xlf
, then strip the.g
in the target file name (e.g.,<ExtensionName>.g.de-DE.xlf
-><ExtensionName>.de-DE.xlf
).
- Forked version 0.2.1 of the Angular Localization Helper extension as a starting point.
- Add support for syncing
trans-unit
nodes nested within groups (recursively). - Add new command: XLIFF: Synchronize All Files