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

Use state property in xlf-files #17 #18

Merged
merged 21 commits into from Dec 9, 2019

Conversation

theschitz
Copy link
Collaborator

@theschitz theschitz commented Dec 7, 2019

Changes to solve issue #17 .

  • New setting NAB.UseExternalTranslationTool this setting modifies the target state attribute instead of inserting a searchable string.

  • When searching for all and next untranslated texts and NAB.UseExternalTranslationTool == true the state attribute is searched.

  • New setting NAB.ReplaceSelfClosingXlfTags default true. This regulates the use of functionality was added for issue Empty elements are replaced with self-closing tags #5. If set to false no self-closed tags are replaced in xlf-files.

  • Update README.md.

@jwikman
Copy link
Owner

jwikman commented Dec 7, 2019

Does readme.md require any modifications/additions?

@theschitz
Copy link
Collaborator Author

Yes. The readme needs some work to reflect the new possibilities. No default behaviour has changed tho. I'll get back with an update.

Copy link
Owner

@jwikman jwikman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • GetTransUnitLineType() needs to be updated, right now F12 fails if inside a trans-unit with the new state attribute ('Not inside a trans-unit element')
  • When refreshing from g.xlf and target-language==source-language, it should copy source to target, and set attribute state="needs-review-translation"

src/LanguageFunctions.ts Outdated Show resolved Hide resolved
src/LanguageFunctions.ts Show resolved Hide resolved
@theschitz
Copy link
Collaborator Author

A part from the question about wrap search all comments are resolve from my point of view.

Copy link
Owner

@jwikman jwikman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're close now! :-)

The wrap search seems to work, sorry. But it only wraps the current file, it should continue with next xlf file if no matches found in current file.

  • Spelling "sames"->same
  • "Find next untranslated" only searches the open xlf file

README.md Outdated Show resolved Hide resolved
src/LanguageFunctions.ts Outdated Show resolved Hide resolved
Copy link
Owner

@jwikman jwikman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

We'll fix remaining old quirkiness in a new PR

@jwikman jwikman merged commit 4314c46 into jwikman:master Dec 9, 2019
@theschitz theschitz deleted the w/#17_xlf_state branch December 9, 2019 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants