Closed frispete closed 7 years ago
Thanks dude. Ah, "All Day" is translated for the future Edit Event Date/Time form, which is hidden atm. I probably need to wrap the text in i18n() in the timestamp formatting javascript.
Thanks for the translations. "All Day" is marked for translation in the hidden "Edit Event Date/Time" form I've mocked up, but I'll make the text in the agenda translated.
As for the time formats in the agenda, I'm using this bit of code to basically do __ conditions:
All Day
single all day eventMMM d
short form for a dateh AP
and h
short form for a time on the hourh:mm AP
and h:mm
short form for a time where minutes isn't 0.%0, %1
date (%0) and time (%1)%0 - %1
from start date/time (%0) to end date/time (%1)1, 2, 5, and 6 probably need translations, but 3 and 4 probably don't right? Or wait, 4 might need to translate the :
so... eh, probably translated them all.
Which combined can fulfil:
MMM d - MMM d
all day event spanning multiple daysh AP
event today, starting on the hour and ending at the same time (12 hour)MMM d, h AP
event tomorrow or later, starting on the hour and ending at the same time (12 hour)MMM d, h:mm AP
event starting where minutes isn't "0" and ending at the same time (12 hour)MMM d, h AP - MMM d, h AP
event starting on the hour and ending on the hour (12 hour)h AP - MMM d, h AP
event today on the hour and ending another day on the hour (12 hour)h AP - h AP
event today on the hour and ending today on the hour (12 hour)x2 for 24 hour, and x2 for each start/end time not starting on the hour.
Mon Apr 10 2017
or ddd MMM d yyyy
in the calendar tooltip.April 29, 2017
or at least support reversing the order to 29 Avril, 2017
like requested in feature request #61. Didn't want to need translations for such a simple thing but might as well since the rest of the UI needs translating too.MMM d
and ddd
in the agenda probably need translations too.What do you think I should do for 24h clock times on the hour? Should I do 23
or 23:00
? Right now it's 23
but it looks weird to me (whose is used to 12h clocks).
Gonna add a button when it notices the current session is translated, so the install process is easier.
Hi Chris,
thanks for the warmth welcome.
For german, we used to use "d MMM" and "dd.MM.yy", and as you noticed "h:mm" for time, so I think, it needs a 12h vs. 24h switch, and some selectors for such date formats (short, longer, and long forms).
In short, date formats used to have the weekday in front, day, month, then year, e.g. the long form: Mo, 10. Apr 2017.
I wouldn't translate all these date and time formats, just add more choices, and let the translator choose the preferred formats.
As for the installation process, the whole concept for plasmoid updates is half-cooked IMHO, and your stuff is lacking from this fact somewhat (in the sense of a victim).
Restarting plasmashell for new versions isn't the real McCoy either, but Qt used to have a signal for translation changes at least. I didn't checked, if it's available for Qt-Script. Being a passionate PyQt hacker, so please bear with me.
I've added:
+msgctxt "agenda date format line 1"
+msgid "MMM d"
+msgctxt "agenda date format line 2"
+msgid "ddd"
+msgid "(No title)"
since translators will probably want greater freedom in the agenda date column. Also (no title)
when the event has no summary.
I don't think plasma uses qt translate (tr("string")
), it uses ki18n, which wraps gettext.
This following is more for me to document my code skimming for future looking up.
#include "gettext.h"
My current install practice is a hack where it converts the .po files to .mo files then copies them to ~/.local/share/locale
. I could probably package the .mo
files and copy them without the user noticing, but it still requires a restart for them to apply. I also wasn't 100% sure if .mo
files needed to be compiled for different systems (I don't think so but never confirmed it).
There's this bit of code which I think would load files from ./contents/locale
, but it's been commented out for 4 years...
I'm tempted to ask wither kpackage (which only unzips to certain directories atm) should be extracting mo files too, or if they'll be uncommenting that... eventually.
Here's the first pass on a german translation.
The most prominent issue for a real translation: the date format isn't used for the agenda, nor the calendar.
Minor issue: "All Day", while translated, isn't picked up in agenda listing.