-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[#33164] Improve calendar translations in different cultures #2809
Conversation
Added needed strings for Globalization of month/Year in calendar depending on culture
0 for year before month, 1 for month before year (default)
Added needed strings for Globalization of month/Year in calendar depending on culture
0 for year before month, 1 for month before year (default)
Added MONTHS_CAL array, and prefix, suffix and separator for month/year in calendar
Retrieve value from language pack to set if month before year in calendar
Retrieve value from language pack to set if month before year in calendar
Display of calendar Title (month - year) with facultative prefix and suffix for month and/or year, and separator if needed by current language. Set month before year, or year before month depending of setting in language xml file (metadata params)
Will add monthBeforeYear in script declaration of the calendar to display month before year or year before month depending of culture (retrieve metadata param from language pack xml file)
Hi Cyril, This is my first experience as a tester. Have a question. Your idea is very useful, it will be a real improvement for Joomla! Best regards |
Hi Vlad, You can test result in each date field using date picker of Joomla. I will add in main description, a screen shot of calendar in Ukrainian, before and after patch. For example, in iCal on mac, iCal is a nice tool to compare with Joomla (and a reference about good translation in calendar: simple and correct) and see why Joomla could be enhance on this point. |
Oh, maybe it's because you don't have apply this patch in com_patchtester ? Look in Components > Joomla! Patch Tester, you will find it : Improve calendar translations in different cultures - patch #2809 And thank you for your contribution to this patch as a Ukrainian/Russian translator! |
Hi.Cyril. I have understood why I not saw changes :) |
Hi Vlad, This commit is for Joomla! only. This is thanks to your report about my extension, that i have seen the problem for Joomla core. So, i've first thing of an enhancement for Joomla which could be used by all Joomla users. Of course, this improvement is important for all Slavic, Asian... users ! |
No problem. Works fine. |
I close this old PR to keep issue tracker clean. |
issue tracker [#33164] Incorrect formatting of date in calendar title, depending of the culture
link: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33164&start=8375
Currently, in calendar, it is always string MONTH, YEAR.
But in some languages (Slavic, asian... languages), month spelling is not the same depending if it's inside a full date (eg. 18 January 2014) and calendar (January, 2014)
For example, in Ukrainian it is 18 січня 2014 for a date, but it should be "Січень 2014" in calendar (today, it's "січня 2014")
In many language, year should be before month.
The comma is maybe not the best solution, as used in standard date format of many languages.
My proposal is to add new strings for month in calendar, an option (metadata params of xml language file) to set if month before year or year before month, and to give more possibilities for translators to set formatting as it is in their culture (string optional for prefix and/or suffix for month and/or year, and optional separator)
By default, as en-GB the source language, and because no need of prefix or suffix, i have set these strings with a default text, which could help translators using a platform such as Transifex
For example,
en-GB (source) : SUFFIX_MONTH="CALENDAR_SUFFIX_MONTH_FACULTATIVE"
fr-FR (French) : SUFFIX_MONTH=""
ja-JP (Japanese) : SUFFIX_MONTH="月"
and so on...
I've set the separator by default as a space (and remove the comma, not used in some language, and so give possibility to have no space (as for example in Japanese)
So for all prefix, suffix and separator strings, if empty ( "" ) nothing is displayed.
This PR allows flexibility for translators to set date formatting when use in title of the calendar as it is grammatically correct in their language.
This Patch give this result:
prefix
MONTHsuffix
separator
prefix
YEARsuffix
or
prefix
YEARsuffix
separator
prefix
MONTHsuffix
prefix
,suffix
andseparator
are optionalExample in Ukrainian uk-UA :
New strings in uk-UA.ini:
; Calendar
JANUARY_CAL="Січень"
FEBRUARY_CAL="лютий"
MARCH_CAL="березень"
APRIL_CAL="квітень"
MAY_CAL="травень"
JUNE_CAL="червень"
JULY_CAL="липень"
AUGUST_CAL="серпень"
SEPTEMBER_CAL="вересень"
OCTOBER_CAL="жовтень"
NOVEMBER_CAL="листопад"
DECEMBER_CAL="грудень"
PREFIX_MONTH=""
SUFFIX_MONTH=""
PREFIX_YEAR=""
SUFFIX_YEAR=" p."
SEPARATOR_MONTH_YEAR=" "
BEFORE
AFTER Commit and edit language