Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Spanish initial support #622

Merged
merged 1 commit into from
Nov 16, 2021
Merged

Add Spanish initial support #622

merged 1 commit into from
Nov 16, 2021

Conversation

ademar111190
Copy link
Collaborator

Picking texts already added to l10n from the Going Global PR #464 Spanish translation

How it looks like

Menu Menu POS Home (timeago message)
Screenshot_20211102-111158_Breez_Debug Screenshot_20211102-111246_Breez_Debug Screenshot_20211102-112131_Breez_Debug

@@ -23,7 +24,7 @@ class BreezDateUtils {

static String formatTimelineRelative(DateTime d) {
if (DateTime.now().subtract(Duration(days: 4)).isBefore(d)) {
return timeago.format(d, locale: Platform.localeName);
return timeago.format(d, locale: getSystemLocale().languageCode);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using just the language code to avoid default "English" translations if the locale doesn't match language and code.

e.g:
es_MX should use es instead of en.
pt_AO should use pt instead of en.

@@ -40,8 +41,7 @@ class BreezDateUtils {

static void setupLocales() {
timeago.setLocaleMessages('en', timeago.EnMessages());
timeago.setLocaleMessages('en_short', timeago.EnShortMessages());
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing short messages as we do not use it yet.

<string>pt</string>
<string>de</string>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forget to remove de translation from ios, related: #614

@ademar111190 ademar111190 merged commit ff5f519 into breez:master Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant