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

Simplify spoken clock translation #14

Closed
quozl opened this issue May 30, 2017 · 6 comments
Closed

Simplify spoken clock translation #14

quozl opened this issue May 30, 2017 · 6 comments

Comments

@quozl
Copy link
Contributor

quozl commented May 30, 2017

#11 ended with an agreement to change the spoken time to avoid difficult to translate strings; in particular to speak the hour and minute literally, as in "eleven forty-five".

@EmilyOng
Copy link
Contributor

EmilyOng commented Dec 12, 2017

Hello Quozl, please take a look at this :)

I have simplified the clock translation by:


        time(12, 0) => twelve noon |
        time(0, 0) => midnight |
        time(h, 0) => hour(h) o'clock am_pm(h) |
        time(h, m) [m < 10] => hour(h) o' min(m) am_pm(h) |
	time(h, m) [m >= 10] => hour(h) min(m) am_pm(h) |

  1. Changing the output of time(12, 0) to twelve noon instead of hour(12), because for the sake of simplification, I have removed 'noon', 'midnight' and 'quarter' from the list of strings (Same goes for midnight)
  2. I actually though that if we indicated the time as "eleven one" or "ten two", it will be rather weird. So I added a rule, where if the minute(m) is less than 10, it will read "eleven o' one" instead. How is this?
  3. In addition, I removed the "minutes" in the rules.

Please let me know how this is, thank you so much!

Commits
https://github.com/EmilyOng/clock-activity/blob/simplify-t/test_timewriter/LANG_rules.py

Output
timewriter.txt

@quozl
Copy link
Contributor Author

quozl commented Dec 12, 2017

@EmilyOng, thanks. From discussion in #11 the intention was to substantially simplify both what is spoken and how it appears in the source code so that translators will engage using their limited tools. They don't want to have to change source files, only po/*.po files. You may have to explain your proposal to me further, 'cause I'm not very familiar with the code.

@leonardcj
Copy link
Contributor

What needs to happen is to eliminate this very ugly string entry which requires insertion of all sorts of markup

https://translate.sugarlabs.org/en/Clock/translate/#filter=all&unit=960927

Basically, this needs to abandon a rotary clcck face for a digital clock readout.

@quozl
Copy link
Contributor Author

quozl commented Dec 13, 2017

Thanks @leonardcj, there are two issues then;

  • the HTML markup, and;
  • the length of the entry.

The HTML markup is for text colouring to match the colour of the clock hands or digits, and might be moved out of the translatable string and into the source code. This will also slightly reduce the length.

The length of the entry can be further reduced by one or more of the following;

  • removing the nearly duplicate hour1 rules and instead calculate them from the hour rules,
  • switching to smaller keywords, such as h instead of hour,
  • simplifying the rules as @EmilyOng has done.

I don't think the clock face needs to change, just the way it is spoken or described by text.

@EmilyOng, you might also look around for Python library or source code that speaks a time of day; we might accept it if it has good code quality, good license, and internationalisation support using gettext.

@EmilyOng
Copy link
Contributor

EmilyOng commented Dec 13, 2017 via email

@quozl
Copy link
Contributor Author

quozl commented Jan 9, 2018

@leonarcj, this is now complete, please test.

Final genpot change here;
9a5451a

@quozl quozl closed this as completed Jan 9, 2018
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

No branches or pull requests

3 participants