i18n Support #160
No reviewers
Labels
No labels
accessibility
app-parity
area: creator
area: daemon
area: design
area: devops
area: discovery
area: docs
area: installer
area: internal
area: livestream
area: performance
area: proposal
area: reposts
area: rewards
area: search
area: security
area: subscriptions
area: sync
area: ux
area: viewer
area: wallet
BEAMER
channel
comments
community PR
consider soon
core team
css
dependencies
electron
Epic
feature request
first-timers-only
good first issue
hacktoberfest
help wanted
hub-dependent
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
merge when green
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
notifications
odysee
on hold
playlists
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
recsys
redesign
regression
resilience
sdk dependent
Tom's Wishlist
trending
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-desktop#160
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "i18n"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Please excuse some double commits, but it seems like a rebase did go wrong. We doublechecked to make sure every String is translateable, please tell us if we missed a String. There is also a sample translation added that just adds RS_ to every string. Users are able to change the language in the options.
I will also try and create a German translation as soon as this is merged into master. intnick will probably make a Serbian translation.
Tick marks are only used around interpolated strings. If interpolation is being dropped, please switch to double quotes.
@ -38,35 +38,28 @@ export const selectPageTitle = createSelector(
selectCurrentParams,
This code was correct. Yes, it means it cannot easily be translated. For tricky ones like this, just make a note and we'll figure out how to resolve them.
Please update the README and add a heading titled "Internationalization" that explains a bit about this, and anything else that would be relevant to set up or programmers new to the repo. Should be a couple paragraphs tops, and possibly just a sentence or two.
Misstructured call?
Is this used? If not, no need to global.
This can probably be imported when needed, rather than globalled.
Nothing too major, but a few changes I'd like. Next big piece will be figuring out how to pipe translations in and out.
@lyoshenka might want to take a look at this one too
@ -38,35 +38,28 @@ export const selectPageTitle = createSelector(
selectCurrentParams,
@intnick I think you translated this, could you please take a look?
Ohhh, this were my Windows compilation files. They were not supposed to be made public because most ppl are probably working with unix based systems. I am gonna remove them
@intnick can you please have a look at those?
should be fixed
should be fixed
@ -38,35 +38,28 @@ export const selectPageTitle = createSelector(
selectCurrentParams,
OK, do you want to return to the initial solution ? We could possibly translate the return of the function, I just found it not to be an elegant or easily readable solution so I separated them
Yes, the translate functions are used on every page. __n is used rarely and we could use it as i18.__n() instead, though to make it equivalent and available.
I tried it first with i18n component in local scope but problems start with language switching. It wouldn't change the language strings if on the settings page we load the i18n again and do a setLanguage(language) method call. We could tell the user to restart the app, which would have been much easier for me, but I didn't like the idea of app restart if you changed the language. More than open for other suggestions ?
@ -38,35 +38,28 @@ export const selectPageTitle = createSelector(
selectCurrentParams,
Yes, just leave it the way that it was. I'm fine if a few problem strings aren't translated to start (though it'd be good to build a list of these).
I think it'd make sense for i18n to be set in
ui/js/app.js
then?Please make sure to ping me once the few remaining minor changes are made -- I'll put this in master than so we stop generating conflicts with ongoing work.
@ -38,35 +38,28 @@ export const selectPageTitle = createSelector(
selectCurrentParams,
On it. I think a few more have the same case and name so I'll aggregate those as well.
Trying it out
@ -38,35 +38,28 @@ export const selectPageTitle = createSelector(
selectCurrentParams,
I don't know if it helps, but wrapping __() around the output, even if it's not a build-in String (e.g. rewards which are loaded from the server) also work with y18n, you just need to run the app once and then it's added to the language file automatically
Please make the changes discussed in Slack.
Changes should be made, but please review carefully