vessel
vessel copied to clipboard
Localization support
Please add localization support as .json or .pot/.po files. I will configure for you the localization project as we did it for https://crowdin.com/project/esteem
That looks great! I'll get started on this.
Great idea. Please be advised that some languages have different grammar orders from English. So translators can deal with full messages.
Crowdin open source project is ready: https://crowdin.com/project/vessel
I started researching how to implement it properly today, hopefully I'll have some progress on it soon.
Excellent, here the some examples: tt() - https://github.com/steemit/condenser/tree/1070-i18n-refactoring gettext .pot/.po files - https://github.com/byteball/byteball .json localization files - https://github.com/eSteemApp/esteem
I've got the initial code started, but I need to go through the rest of the wallet and convert everything to FormattedMessages.
Does this look like an acceptable format?
https://github.com/aaroncox/vessel/blob/b19e6072935f0688da8d5ff758d429f57edb909d/app/locales/en.json
There will be one json file for each language, starting with en.json
.
Excellent! But better to use structure like this (where strings grouped by sections):
{
"general": {
"name": "Vessel",
"height": "Height"
},
"menu": {
"overview": "Overview",
"send": "Send",
"vesting": "Vesting",
"accounts": "Accounts",
"settings": "Settings"
}
}
How this looks in Crowdin:
I'll have to figure out how to do that - the library I'm using right now uses the dot notation to delineate namespaces for adding to the app.
You need to make and keep updated only en.json, all other languages files (based on en.json) Crowdin will create and sync update for you.
Dot notation it's exactly now this should be, but this dot notation should count the sections, so FormattedMessages("menu.settings") will return right result from json:
{
"menu": {
"overview": "Overview",
"settings": "Settings"
}
}
Also please check if library supports parameterized strings and allow you to make something like FormattedMessages("menu.transfer_successful", 1.0, "STEEM", account)
{
"menu": {
"overview": "Overview",
"transfer_successful": "The {amount} {asset} successfully transferred to {account}"
}
}
It does support parameterized strings. For reference, it's the react-intl library.
Just ran a test, the parameterized strings come out as such currently:
{
"welcome": "Hello {name}, you have {unreadCount, number} {unreadCount, plural, one {message} other {messages}}",
}
if there is some interest: there is an alternative to react-intl => react-i18next
@aaroncox Any news about localization?
@testzcrypto I've made some progress on learning how to implement it (on chainBB, not Vessel) that I hope to get implemented in Vessel at some point.
@aaroncox Any progress with localization support? Now when Vessel become very popular Steem wallet this issue become very important ;-)
@testzcrypto been in an epic battle with just keeping people connected to steemd, no progress to report at this time.
@aaroncox I understand, and will wait for news in localization support when it's become visible. Thanks for great job!