Fix localization concatenation + Cleanup unused strings #4239

Merged
infinite-persistence merged 9 commits from fix-localization-concat into master 2020-05-28 15:50:09 +02:00
infinite-persistence commented 2020-05-25 00:41:53 +02:00 (Migrated from github.com)

This is a draft proposal before I go ahead to fully implement the changes.

Proposed changes:

  1. Change all instances of concatenated strings into a single strings so that translators can handle them as a single entity. Not all languages follow the same word structure as English.
  2. Remove unused strings for (a) tidiness (b) save translators from working on unused strings.

See the commit messages for further details.

The last 2 commits are examples of the cleanup work; if this PR is wanted, then more of these commits will come.


Fixes #4202 and others.

This is a draft proposal before I go ahead to fully implement the changes. Proposed changes: 1. Change all instances of concatenated strings into a single strings so that translators can handle them as a single entity. Not all languages follow the same word structure as English. 2. Remove unused strings for (a) tidiness (b) save translators from working on unused strings. See the commit messages for further details. The last 2 commits are examples of the cleanup work; if this PR is wanted, then more of these commits will come. ---- Fixes #4202 and others.
kauffj (Migrated from github.com) reviewed 2020-05-25 00:41:53 +02:00
neb-b (Migrated from github.com) reviewed 2020-05-25 00:41:53 +02:00
kauffj (Migrated from github.com) requested changes 2020-05-25 20:21:13 +02:00
kauffj (Migrated from github.com) commented 2020-05-25 20:20:13 +02:00

just delete these

just delete these
kauffj (Migrated from github.com) commented 2020-05-25 20:20:56 +02:00

drop this

drop this
infinite-persistence commented 2020-05-25 20:25:03 +02:00 (Migrated from github.com)

Ah, we can just safely delete strings. Ok, will do.

Ah, we can just safely delete strings. Ok, will do.
infinite-persistence commented 2020-05-26 15:02:03 +02:00 (Migrated from github.com)

PR Checklist

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I have checked that this PR does not introduce a breaking change

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Refactoring (no functional changes)

Fixes

Issue Number: Fixes #4202 and others + general cleanup.

What is the current behavior?

  • There exists split sentences that is hard to translate in some languages.
  • The are lots of obsolete strings that translators are wasting time over.

What is the new behavior?

  • No more split sentences + fewer occurrences of partially-translated strings.
  • Less work for new translators (lesser unused strings).
  • Added as many untranslated strings that I can find.

I still leave some unused strings around as they look useful for future use (e.g. those about encrypting wallets, etc.)

## PR Checklist Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [x] I have checked that this PR does not introduce a breaking change ## PR Type What kind of change does this PR introduce? - [x] Bugfix - [x] Refactoring (no functional changes) ## Fixes Issue Number: Fixes #4202 and others + general cleanup. ## What is the current behavior? - There exists split sentences that is hard to translate in some languages. - The are lots of obsolete strings that translators are wasting time over. ## What is the new behavior? - No more split sentences + fewer occurrences of partially-translated strings. - Less work for new translators (lesser unused strings). - Added as many untranslated strings that I can find. I still leave some unused strings around as they look useful for future use (e.g. those about encrypting wallets, etc.)
TigerxWood (Migrated from github.com) reviewed 2020-05-27 13:05:35 +02:00
@ -47,3 +48,4 @@
Skip: <Button {...skipButtonProps} button="link" label={__('Skip')} />,
}}
>
If you'd like to participate our %rewards_program% to earn credits, please complete one of the steps below
TigerxWood (Migrated from github.com) commented 2020-05-27 13:05:35 +02:00

I think you should remove the LF (end of line) after word *below *, to be translatable with the string from app-strings.json file

I think you should remove the LF (end of line) after word *below *, to be translatable with the string from app-strings.json file
TigerxWood (Migrated from github.com) reviewed 2020-05-27 13:37:53 +02:00
TigerxWood (Migrated from github.com) commented 2020-05-27 13:37:52 +02:00

Why not make it 'Read more.' (for consistency with other files), and remove the duplicate 'Read more ' from strings?

Why not make it 'Read more.' (for consistency with other files), and remove the duplicate 'Read more ' from strings?
infinite-persistence (Migrated from github.com) reviewed 2020-05-27 14:43:40 +02:00
@ -47,3 +48,4 @@
Skip: <Button {...skipButtonProps} button="link" label={__('Skip')} />,
}}
>
If you'd like to participate our %rewards_program% to earn credits, please complete one of the steps below
infinite-persistence (Migrated from github.com) commented 2020-05-27 14:43:40 +02:00

Yeah, I noticed that with a few other sentences as well. I agree that it makes string-searching hard(er).

I left it as is since there were few other similar instances, so I don't know if it was intentional or not.

Yeah, I noticed that with a few other sentences as well. I agree that it makes string-searching hard(er). I left it as is since there were few other similar instances, so I don't know if it was intentional or not.
infinite-persistence commented 2020-05-27 14:45:54 +02:00 (Migrated from github.com)

After all of this, I found https://github.com/lbryio/lbry-desktop/issues/3440. I guess this could be a pre-cursor to #3440, but would be obsolete when that happens.

After all of this, I found https://github.com/lbryio/lbry-desktop/issues/3440. I guess this could be a pre-cursor to #3440, but would be obsolete when that happens.
infinite-persistence (Migrated from github.com) reviewed 2020-05-27 14:48:22 +02:00
infinite-persistence (Migrated from github.com) commented 2020-05-27 14:48:22 +02:00

for future reuse e.g.

<token:button:%read_more%>
"%read_more% or refresh the page to fix it."
for future reuse e.g. ``` <token:button:%read_more%> "%read_more% or refresh the page to fix it." ```
TigerxWood (Migrated from github.com) reviewed 2020-05-27 16:39:15 +02:00
TigerxWood (Migrated from github.com) commented 2020-05-27 16:39:15 +02:00

OK. then make it here 'Read more.' (It's a sentence) and leave also the 'Read more' in string list.

OK. then make it here 'Read more.' (It's a sentence) and leave also the 'Read more' in string list.
TigerxWood (Migrated from github.com) reviewed 2020-05-27 17:19:15 +02:00
TigerxWood (Migrated from github.com) commented 2020-05-27 17:19:15 +02:00

But where did you find this? I can't find it.
token:button:%read_more%
"%read_more% or refresh the page to fix it."

Also I searched for this strings below and I can't find them anywhere.
"%duration% minute ago": "%duration% minute ago",
"%duration% seconds ago": "%duration% seconds ago",
"%duration% second ago": "%duration% second ago",
"%duration% ago": "%duration% ago",

But where did you find this? I can't find it. <token:button:%read_more%> "%read_more% or refresh the page to fix it." Also I searched for this strings below and I can't find them anywhere. "%duration% minute ago": "%duration% minute ago", "%duration% seconds ago": "%duration% seconds ago", "%duration% second ago": "%duration% second ago", "%duration% ago": "%duration% ago",
infinite-persistence (Migrated from github.com) reviewed 2020-05-27 17:22:23 +02:00
infinite-persistence (Migrated from github.com) commented 2020-05-27 17:22:23 +02:00

As I said, "future, e.g.".

As for %duration%, the string ID is generated on runtime. Search for %duration%, or delete it on your local runtime and see it being automatically added.

As I said, "future, e.g.". As for %duration%, the string ID is generated on runtime. Search for `%duration%`, or delete it on your local runtime and see it being automatically added.
TigerxWood (Migrated from github.com) reviewed 2020-05-27 19:42:07 +02:00
TigerxWood (Migrated from github.com) commented 2020-05-27 19:42:07 +02:00

OK, also there are some strings like "Earn %rewards_link% for inviting your friends. Read our %referral_faq_link% to learn more." from "ui\component\inviteNew\view.js" that for some reasons are not translated. Everything seems fine in code, the text is already there in Transifex translated, but on the app interface is not translated. Maybe you can spot what could be the cause. I can't find anything wrong.

OK, also there are some strings like "Earn %rewards_link% for inviting your friends. Read our %referral_faq_link% to learn more." from "ui\component\inviteNew\view.js" that for some reasons are not translated. Everything seems fine in code, the text is already there in Transifex translated, but on the app interface is not translated. Maybe you can spot what could be the cause. I can't find anything wrong.
infinite-persistence (Migrated from github.com) reviewed 2020-05-27 19:54:24 +02:00
infinite-persistence (Migrated from github.com) commented 2020-05-27 19:54:24 +02:00

Ah, I've fixed that bug earlier this week, and Sean has merged into the next RC. There was a mistake in the <i18nMessage> that only translated the tokens and not the entire sentence.

Ah, I've fixed that bug earlier this week, and Sean has merged into the next RC. There was a mistake in the `<i18nMessage>` that only translated the tokens and not the entire sentence.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#4239
No description provided.