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

[#33164] Improve calendar translations in different cultures #2809

Closed
wants to merge 11 commits into from

Conversation

cyrezdev
Copy link
Contributor

@cyrezdev cyrezdev commented Jan 18, 2014

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 MONTH suffix separator prefix YEAR suffix
or
prefix YEARsuffix separator prefix MONTH suffix

prefix, suffix and separator are optional

Example 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
current_uk-ua

AFTER Commit and edit language
commit 2809_uk-ua

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)
@SLV54
Copy link

SLV54 commented Jan 18, 2014

Hi Cyril,

This is my first experience as a tester.
I installed com_patchtester, made ​​changes in language files (ru_RU.ini, uk_UA.ini).
Unfortunately I can not understand - how I can test the result of the patching.

Have a question.
How can be to indicate a shortened and full year suffix?
For example, for the Ukrainian language (in calendar and in date) can be used:
SUFFIX_YEAR = "p." (short)
or
SUFFIX_YEAR = "року" (full)

Your idea is very useful, it will be a real improvement for Joomla!

Best regards

@cyrezdev
Copy link
Contributor Author

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.
About suffix year, i think to add only one, because having a short and long will be too "much"
The best suited should be chosen, but in my opinion the shorten is nicer!

For example, in iCal on mac, January 2014 is Січень 2014 without suffix, but, on many ukrainian website, i have seen a suffix when in calendar but not always. So, could you confirm my screenshot?

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.

@cyrezdev
Copy link
Contributor Author

Unfortunately I can not understand - how I can test the result of the patching.

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!
;-)

@SLV54
Copy link

SLV54 commented Jan 19, 2014

Hi.Cyril.

I have understood why I not saw changes :)
Because tested datepicker in the event dates in icagenda. There changes not work.
In admin panel articles dates- all Ok!
Will test more and inform you, maybe on Monday.

@cyrezdev
Copy link
Contributor Author

Hi Vlad,

This commit is for Joomla! only.
But the new strings could be used by other third party developpers.
About my extension, i've send you in private the zip file to test it, using changes in Joomla strings. ;-)
Here, we will only discuss about Joomla enhancement!

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 !

@SLV54
Copy link

SLV54 commented Jan 20, 2014

No problem. Works fine.
Many thanks.

@cyrezdev
Copy link
Contributor Author

I close this old PR to keep issue tracker clean.
Will see another day for a new proposal ;-)

@cyrezdev cyrezdev closed this Mar 14, 2015
@joomla-cms-bot joomla-cms-bot changed the title Improve calendar translations in different cultures [#33164] Improve calendar translations in different cultures Mar 14, 2015
@cyrezdev cyrezdev deleted the calendar-translations branch April 21, 2016 15:33
@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label Jun 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants