Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the parseFromDeveloperNoteTrimCharacters in the tTranslations snippets #109

Open
fvet opened this issue Jul 6, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@fvet
Copy link

fvet commented Jul 6, 2022

The tTranslations snippets are conditionally generated, respecting the "xliffSync.snippetTargetLanguage"

Example

"xliffSync.snippetTargetLanguage": "nl-BE",

Resuls in

Caption = 'CaptionText', Comment = 'nl-BE=Translation';


However, since #100 we also have a new setting "xliffSync.parseFromDeveloperNoteTrimCharacters" that should be supported by the tTranslations snippets.

Example

"xliffSync.parseFromDeveloperNoteTrimCharacters": "\"",

Resuls in

Caption = 'CaptionText', Comment = 'nl-BE=Translation';

Where the expected result would be (=> adding the extra charachter(s) - e.g. " - from parseFromDeveloperNoteTrimCharacters)

Caption = 'CaptionText', Comment = 'nl-BE="Translation"'; (*)


(*) This allows the developer to quickly add translations in code via Google Translate in VS Code

  • With some shortcuts magic (Ctrl+D / Ctrl+F2), the developer select e.g. all nl-BE tags.
  • Then, moves twice to the right and by using the Bracket Selection extension (Alt+A) can easily select everything within the " ".
  • Once the selecting is made, using the VS Code Google Translate, we can batch translate all at once.
@rvanbekkum rvanbekkum added the enhancement New feature or request label Jul 6, 2022
@rvanbekkum
Copy link
Owner

I could look into something for that.

Also, something that I have also considered is making a "xliffSync.snippetTargetLanguages": [] setting, which will replace the xliffSync.snippetTargetLanguage after some time, but they should be able to both work, at least for quite some time, i.e., if the first setting is not empty, that will be used, otherwise, the existing setting will be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants