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

i18n: Add compile-time language setting #323

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

WesleyAC
Copy link
Collaborator

This currently supports Spanish and German (with English being the default), and simply translates the weekdays, although more translations should be added.

German translations are from @Kaoala on GH Discussions. Spanish translations are from ltzamatema on Discord.

DO is a little hard to read (it looks a little like OO if you're not expecting it). Possibly dO would look better, but I've chosen to keep everything in caps for now. If someone who uses the watch in another language would like to change it, feel free.

This currently supports Spanish and German (with English being the
default), and simply translates the weekdays, although more translations
should be added.

German translations are from @Kaoala on GH Discussions.
Spanish translations are from ltzamatema on Discord.

DO is a little hard to read (it looks a little like OO if you're not
expecting it). Possibly dO would look better, but I've chosen to keep
everything in caps for now. If someone who uses the watch in another
language would like to change it, feel free.
@xurizaemon
Copy link

Great to see this @WesleyAC! Thanks.

Here's a link to my writeup of the Reo Māori translation - similarly to DO, I found AP wouldn't render on the day characters, and settled for now on A - appreciate input from anyone with more than my limited knowledge.

I expect this would be used with make LANGUAGE=SPANISH when building. I looked for where we'd add documentation to clarify that for folks, seems like this page touches on compile time flags, and it would be a separate MR for a different target branch.

@WesleyAC
Copy link
Collaborator Author

I saw you mention those on Discord and just added them in a second commit :)

The reason AP can't display properly is that the two segements on the left side and the two segments on the right side of that character are each tied together — https://www.sensorwatch.net/docs/wig/display/#limitations-of-the-weekday-digits has a diagram that explains it. I think that just showing "A" is a good solution.

And yep, it's used in that way. I'll send a PR to update the docs as well.

@xurizaemon
Copy link

Just want to say I'm using this and the PR has my thumbs up to accept :) thanks @WesleyAC

@maxz
Copy link
Contributor

maxz commented Jan 23, 2024

I also used a custom patch to set different weekday abbreviations. It would be nice if this PR got merged. The fewer things to maintain in a personal branch the better.

We probably should collect places where it makes sense to have translations.
Due to display space constraints it probably does not make sense in all places where it would be theoretically possible.

https://github.com/joeycastillo/Sensor-Watch/blob/main/movement/watch_faces/complication/alarm_face.c#L42
For German it would be
static const char _dow_strings[ALARM_DAY_STATES + 1][2] ={"AL", "MO", "DI", "MI", "DO", "FR", "SA", "SO", "JT", "1x", "MF", "WE"};
I have no idea what the original "AL" stands for. Alarm?

And the original "SO" should probably be "SU" in the English version.
"WE" instead of "WN" would also be more intuitive for English and fits within the display constraints. (Or maybe it was chosen as "WN" to not be confused with weekly?)

The entries in https://github.com/joeycastillo/Sensor-Watch/blob/main/movement/watch_faces/settings/preferences_face.c also seem very suitable to receive translations, but I'd have to invest more time in finding proper values for the display for those.

@matheusmoreira matheusmoreira added enhancement New feature or request tested-on-hw This feature or pull request has been tested on a physical watch 2.0-wait-list This feature or pull requests has been deferred until the movement 2.0 refactor is complete labels Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0-wait-list This feature or pull requests has been deferred until the movement 2.0 refactor is complete enhancement New feature or request tested-on-hw This feature or pull request has been tested on a physical watch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants