Closed rob006 closed 4 years ago
Are those differences happens because of sentences? What about these:
differences: "Differences: {old} and {new}"
previewMode: "Preview: {content}"
Because those advices that you linked will took us here eventually.
What about these
It looks unnatural, and I'm not sure how to translate it to be hones.
These differences are because of sentences, but you can still keep sentence format and give some flexibility to translators. You have at least 2 options:
the-turk-diff.forum.originalContent
key, you could add 2 separate keys: the-turk-diff.forum.differences.originalContent
and the-turk-diff.forum.preview.originalContent
. For English they will be the same, but for Polish I could translate them differently.I talked with @clarkwinkelmann on Discord and he suggested this:
ok so the translation reuse thing does make sense here. I'd suggest you create a
ref
namespace (you can see core has one and a few other extensions do that as well) where you define english values fororiginalContent
,currentContent
andrevisionWithNumber
, then you do exactly as your last example, but you re-use those ref translations with=> your-ext.ref.originalContent
. That way for languages where the values stay the same, the translator can replace the ref value, but for languages where they must differ, the translator can replace the individual texts directly and skip the ref part
That sounds like a perfect solution. What do you think?
That was my last example by the way:
That sounds like a perfect solution. What do you think?
I would still prefer solution 2 with complete phrases for each combination (redundancy is not a problem from my perspective), but this should be fine too.
Second suggestion simplifies the translation process but complicates the backend and causes repetitive code parts over and over. Clark's suggestion was relatively easy to implement and I believe it will solve this issue for most of languages.
v1.0.4 is ready for release and will solve this issue (here are some related lines) but I also want to hear from @Littlegolden. I don't think these changes will effect their translations since they already have translated the extension for both Simple Chinese & Japanese languages but who knows maybe they have another issue that dissatisfies them.
I think the way you modified now is workable, if there is a need to make it easier for the translator to understand, sample notes can be added.
In the Chinese and Japanese translations for Diff Extenxison, there is no problems about this.
Thanks! v1.0.4 released.
You're reusing some translations (
the-turk-diff.forum.originalContent
,the-turk-diff.forum.currentContent
,the-turk-diff.forum.revisionWithNumber
) to generate messages fromthe-turk-diff.forum.differences
andthe-turk-diff.forum.previewMode
. But in Polishthe-turk-diff.forum.differences
andthe-turk-diff.forum.previewMode
creates completely different context and requires different translations forthe-turk-diff.forum.originalContent
,the-turk-diff.forum.currentContent
,the-turk-diff.forum.revisionWithNumber
.Examples:
the-turk-diff.forum.differences:
EN: You're viewing differences between original content and revision 3. PL: Przeglądasz różnice pomiędzy originalną treścią i rewizją nr 3
the-turk-diff.forum.previewMode:
EN: You're previewing original content PL: Przeglądasz oryginalną treść
EN: You're previewing revision 3 PL: Przeglądasz rewizję nr 3
As you can see
the-turk-diff.forum.originalContent
andthe-turk-diff.forum.revisionWithNumber
requires different translations forthe-turk-diff.forum.differences
and different forthe-turk-diff.forum.previewMode
(originalną treścią
vsoryginalną treść
andrewizją nr 3
vsrewizję nr 3
). Please create separate strings for these 2 cases (see Reuse Translations, Not Keys!) or avoid joining strings in this way completely (see Avoid Hardcoded Syntax!).