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

Developer note - Delimiter Tag #100

Closed
fvet opened this issue Feb 16, 2022 · 10 comments
Closed

Developer note - Delimiter Tag #100

fvet opened this issue Feb 16, 2022 · 10 comments
Labels
effort: low Initial effort estimate: Low enhancement New feature or request priority: medium Priority estimate: Medium shipped Issue is available in the public release.

Comments

@fvet
Copy link

fvet commented Feb 16, 2022

Hi @rvanbekkum

I'm trying to prepare the move away to AL Language Tools to XLIFF Sync here internally.
I think we can easily adopt our way of working and achieve the same (and much better results) with XLIFF Sync.

However, some developers currently use a - nice - work-around to auto-translate the comments (upfront inside the AL files, not after the XLIFF files have been synced). In order not to offend anyone, I'd still like to - temporarily ? - support this way of working.

E.g. following could the format used when adding new labels, captions, ...
(Mind the " " surrounding the values to be translated)

Caption = 'Item No.', Comment = 'fr-BE="Item No.",nl-BE="Item No."';

  • With some shortcuts magic (Ctrl+D / Ctrl+F2), the developer select e.g. all fr-BE tags.
  • Then, moves twice to the right and by using the Bracket Selection extension (Alt+A) can easily select everything within the " ".
  • If we would remove the " " (as Xliff snippets suggest), we won't be able to select the full text accompanying fr-BE.
  • Once the selecting is made, using the VS Code Google Translate, we can batch translate all at once.

Result would be

Caption = 'Item No.', Comment = 'fr-BE="N° article",nl-BE="Artikelnr."';

Animation below shows the current way of working (not yet using the proper language tags )

google

However, when XLIFF Sync parses the developer notes (using ',' as separator), we still have " " inside the translation / target value.

image

Would it be an option to provide a new 'Parse From Developer Note Delimiter' setting (cfr. separator), so we can exclude the " " from the translated result?

image

@rvanbekkum
Copy link
Owner

Hi @fvet,
So if I understand correctly, you would like an option to have some characters trimmed from the translation?
For example, have:

{
    "parseFromDeveloperNoteTrimCharacters": "\""
}

Would that suit your needs?

@rvanbekkum rvanbekkum added enhancement New feature or request input-needed Extra attention is needed effort: low Initial effort estimate: Low priority: medium Priority estimate: Medium labels Feb 17, 2022
@fvet
Copy link
Author

fvet commented Feb 17, 2022

Yes, that would do it. Trim the mentioned leading / trailing character (") from the translation.

@rvanbekkum rvanbekkum removed the input-needed Extra attention is needed label Feb 17, 2022
@fvet
Copy link
Author

fvet commented Mar 8, 2022

Hi @rvanbekkum. Any timing on when this could make the next release?

@rvanbekkum
Copy link
Owner

Hi @fvet,
I think it might be at the end of March the earliest. The past and upcoming days I did not have much time to spent on changes. I also still want to include the changes last suggested in #87 in an upcoming release (even though it has been some time) as I do think they might be useful!

@rvanbekkum
Copy link
Owner

A change for this is ready for the next release and has been checked in on the develop branch, commit fc0ba6a.

@rvanbekkum rvanbekkum added the ships-in-future-update Resolution will be available in the next release. label Apr 29, 2022
@fvet
Copy link
Author

fvet commented May 13, 2022

Hi Rob, thanks for the update.

Any timing on when this new feature will be (pre-)released?
Looking forward to test ;)

@rvanbekkum
Copy link
Owner

Hi Frédéric,
I hope to make a release this week again.

@rvanbekkum rvanbekkum added shipped Issue is available in the public release. and removed ships-in-future-update Resolution will be available in the next release. labels May 19, 2022
@rvanbekkum
Copy link
Owner

Released in version 1.3.0.

@dannoe
Copy link
Contributor

dannoe commented May 20, 2022

@fvet Just out of curiosity: Was replacing the old format (with ") with the new format (without ") not an option? Could be done with a single regular expression and Find&Replace

@fvet
Copy link
Author

fvet commented Jun 16, 2022

  • Then, moves twice to the right and by using the Bracket Selection extension (Alt+A) can easily select everything within the " ".

As referered to in my initial post, some of the developers use the Bracket Selection extension (Alt+A) to easily select everything within the " " to translate e.g. with VS Code Google Translate.

If we would remove the " ", we won't be able to select the full text accompanying nl-BE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: low Initial effort estimate: Low enhancement New feature or request priority: medium Priority estimate: Medium shipped Issue is available in the public release.
Projects
None yet
Development

No branches or pull requests

3 participants