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

Workflow / new/empty translations #38

Open
ytsurk opened this issue Mar 3, 2023 · 3 comments
Open

Workflow / new/empty translations #38

ytsurk opened this issue Mar 3, 2023 · 3 comments

Comments

@ytsurk
Copy link

ytsurk commented Mar 3, 2023

When I start a new project, and use the extracted file (with ng extract-i18n) as template for my locales (I added also the trgLang), t9n wont start until I deleted all <units> or added them empty <target> nodes.

Failed to serialize target files
[Nest] 34132 - 03.03.2023, 14:37:47 ERROR [ExceptionHandler] Cannot read properties of undefined (reading 'textContent')
TypeError: Cannot read properties of undefined (reading 'textContent')
at Xlf2Deserializer._convertToString (C:\ws\zvs-vertragsmanager-web\node_modules\angular-t9n\server\index.js:945:19)
at Xlf2Deserializer._extractTarget (C:\ws\zvs-vertragsmanager-web\node_modules\angular-t9n\server\index.js:1124:21)
at Xlf2Deserializer._deserializeTargetUnit (C:\ws\zvs-vertragsmanager-web\node_modules\angular-t9n\server\index.js:1101:26)
at C:\ws\zvs-vertragsmanager-web\node_modules\angular-t9n\server\index.js:1084:30

You also can reproduce this, if you delete one <target> node in a messages.xx_YY.xlf file.

Further - as soon as I start t9n, all my translations will get empty <target> nodes, which seems quite bad to me.
As long as I do not provide translations, running my app in the non source locale will display emptiness...
Is this the desired behavior? How can I mark translations as no availabe?

@ytsurk ytsurk changed the title Workflow / New/empty translations Workflow / new/empty translations Mar 3, 2023
@fritteli
Copy link

We're also affected by this issue. Particularly, the empty <target/> tags with the resulting display of no text at all tags hurt.

Are there any plans to do something about it?

@kyubisation
Copy link
Owner

Not at the time, as this project has quite low priority.
Feel free to contribute the necessary changes, if this is an urgent topic.

@cloakedch
Copy link

The changes in #50 would solve our use case, but there might still be work left to do (XLFSerializer and XLFDeserializer, which I didn't touch). Also there are no tests in it.

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

No branches or pull requests

4 participants