sugarlabs / clock-activity

A nice clock for the Sugar learning environment
Other
0 stars 6 forks source link

Simplify spoken clock translation #14

Closed quozl closed 6 years ago

quozl commented 7 years ago

https://github.com/sugarlabs/clock-activity/pull/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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

Thanks @leonardcj, there are two issues then;

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;

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 commented 6 years ago

Thanks!

On Wed, 13 Dec 2017 at 09:43, James Cameron notifications@github.com wrote:

Thanks @leonardcj https://github.com/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 https://github.com/emilyong has done.

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sugarlabs/clock-activity/issues/14#issuecomment-351254381, or mute the thread https://github.com/notifications/unsubscribe-auth/AUN_KZSrXABLLNZxjhlQay_C0o8xaQIaks5s_yu0gaJpZM4NpzXc .

quozl commented 6 years ago

@leonarcj, this is now complete, please test.

Final genpot change here; 9a5451a6d0ad682d98544cd88800aa2abdd225e9