Repository navigation
fix(viewer): make the editor's messages translatable - #446
Merged
Merged
Conversation
The editor wrapped t() with the app id built in, so its calls had no second argument and the translation extraction never picked up their strings. "Saving…", the close confirmation, "Main Topic" and the load errors therefore stayed English in every language. Pass the app id at each call, and pass the load error as a parameter instead of appending it, which also adds the missing space. Reword the close confirmation and the load error, which had no translations yet. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Member
Author
|
/backport to stable-0.1 |
An XMind file without content.json or content.xml failed with the English "Content document missing", which the load alert showed in every language. Use a translated message that matches the FreeMind import's. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a German interface, the Save button turns into the English "Saving…" while saving.
src/viewer.jswrappedt()with the app id built in, so its calls looked liket('Saving…'). The translation extraction only picks up strings that are the second argument oft('<app>', '<text>'), so none of these strings ever reached Transifex: runningxgettext --keyword=t:2on the old file extracts nothing, on the new one all six.Affected strings:
Changes:
{error}parameter instead of appending it. This also adds the missing space ("Load file fail!Unsupported file type…").The XMind import had a related gap: a file without
content.jsonorcontent.xmlfailed with the untranslated "Content document missing", which the load alert then showed. It now uses "This file is not a valid XMind mind map.", matching the FreeMind import, with a test.The translations themselves arrive through Transifex once the strings are picked up.
🤖 AI (if applicable)