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

Localizations? #36

Closed
JayBrown opened this issue Nov 30, 2020 · 6 comments
Closed

Localizations? #36

JayBrown opened this issue Nov 30, 2020 · 6 comments
Labels
enhancement New feature or request
Milestone

Comments

@JayBrown
Copy link

JayBrown commented Nov 30, 2020

I could supply a German localization for the app.

Would probably need to be prepared with a .strings file and an .lproj folder.

PS: my own system is English, but I could switch for testing, if necessary.

@melonamin
Copy link
Contributor

Yes! Let me prepare the project to support Localization and do English first, then we could add other languages.

@melonamin melonamin added this to the 1.1.0 milestone Nov 30, 2020
@JayBrown
Copy link
Author

Take your time. I probably won't have any either before Christmas. 😉

@melonamin melonamin removed this from the 1.1.0 milestone Dec 13, 2020
melonamin added a commit that referenced this issue Dec 19, 2020
@melonamin
Copy link
Contributor

melonamin commented Dec 19, 2020

This is done, to add German localization you need to edit this file

PS: my own system is English, but I could switch for testing, if necessary.

You can actually set the desired language when running from Xcode it is much easier

@melonamin melonamin added this to the 1.1.2 milestone Dec 19, 2020
@melonamin melonamin added the enhancement New feature or request label Dec 19, 2020
@JayBrown
Copy link
Author

Before I update the files, some questions & comments.

(1) Some keys/strings possibly missing?

"PF_LAUNCH_AT_LOGIN" = "Launch at login";
"PF_RESET_ALL" = "Reset All";

(2) Typos (will also correct in the English file)

  • "Ok" should be "OK"
  • three dots ... should be displayed with the ellipsis

(3) MB_LAST_UPDATED
English "Updated" would be German "Aktualisiert". However, as far as I can tell, this key refers to the root menu string displayed as e.g. "Updated 9 Seconds Ago", "Updated 8 Minutes Ago", "Updated 7 Hours Ago" etc.

A German key would then render the root menu string into "Aktualisiert 9 Seconds Ago" etc., which would be a mix of German and English, and also have an incorrect grammatical order… in reality it would have to be "Vor 9 Sekunden aktualisiert" etc.

So we might need some additional keys, e.g. like so: "Updated $num $time Ago" > "Vor $num $time aktualisiert"

And the time strings for the time variable would be:

"Second" > "Sekunde"
"Seconds" > "Sekunden"
"Minute" > "Minute"
"Minutes" > "Minuten"
"Hour" > "Stunde"
"Hours" > "Stunden"
"Day" > "Tag"
"Days" > "Tagen"

…with differentiation between singular (for one second/minute/hour) and plural (more than two seconds/minutes/hours or more).

melonamin added a commit that referenced this issue Dec 20, 2020
@melonamin
Copy link
Contributor

(1) Some keys/strings possibly missing?

"Launch at login" good catch, I though it is localized in external library, fixed.
"Reset All" was replaced to "PF_ENABLE_ALL" = "Enable All";

(2) Typos (will also correct in the English file)

Fixed

(3) MB_LAST_UPDATED

Here is the code:

let relativeDate = formatter.localizedString(for: lastUpdated, relativeTo: Date()).capitalized
lastUpdatedItem.title = "\(Localizable.MenuBar.LastUpdated.localized) \(relativeDate)"

The date piece localized by iOS, this will probably cause problems in languages where the verb can't be on the first place? I don't know.

Here how it looks at this moment in German locale:

CleanShot 2020-12-20 at 10 07 21@2x

@xilopaint
Copy link
Contributor

I could supply a German localization for the app.

Would probably need to be prepared with a .strings file and an .lproj folder.

@JayBrown German localization is still pending. You already have the necessary files to submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants