CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • How to tell when last version of a translation was made?
Pages: [1]

Author Topic: How to tell when last version of a translation was made?  (Read 558 times)

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
How to tell when last version of a translation was made?
March 04, 2015, 07:24:35 am
I'm trying to figure out how to determine when the last translation was done for a certain language, particularly the ones that are sitting at 0% translated. This is for potential inclusion in new version of Using CiviCRM. As I understand it, we only have the current version's strings in Transifex. So it would likely be best to look at last release for previous versions like 4.4, 4.3, 4.2, etc and diff'ing the relevant language files against en_US. Or is there a simpler way?
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: How to tell when last version of a translation was made?
March 04, 2015, 01:23:01 pm
This is probably not the most efficient way to do it, but using the git l10n repository:

Code: [Select]
cd l10n/po
for i in *; do
  git log --format='%H %an' $i | grep -v 'Mathieu Lutfy' | grep -v 'Piotr Szotkowski' | \
    grep -v -E '[Ll]10n scripts' | cut -d ' ' -f1 | head -1 | \
    xargs -n1 git log -1 --format="$i %an %ad" --date=short;
done

Or if you'd like to sort it by date of last edit:

Code: [Select]
for i in *; do
  git log --format='%H %an' $i | grep -v 'Mathieu Lutfy' | grep -v 'Piotr Szotkowski' | \
    grep -v -E '[Ll]10n scripts' | cut -d ' ' -f1 | head -1 | \
    xargs -n1 git log -1 --format="%ad $i %an" --date=short; done | sort -n

Result:

Code: [Select]
2011-10-27 be bgm
2011-10-27 bs bgm
2011-10-27 en_AU bgm
2011-10-27 mk bgm
2011-10-27 th bgm
2012-06-07 ku Joy Zhao
2012-09-07 am_ET Red Shen
2012-10-24 pot HanV
2013-04-16 kn appcenter123
2013-04-16 nds appcenter123
2013-04-26 es_DO joseagrc
2013-04-26 es_PR iortiz
2013-04-26 eu txeli
2013-04-26 my
2013-04-26 te
2013-05-11 ga snpower
2013-05-15 ach diegov
2013-05-25 en_CA Richard
2013-06-22 de_CH fabiant
2013-08-02 ta rajeshs
2013-11-20 es_CL Patricio
2013-11-20 is_IS Michał
2013-11-27 eu_ES ixiam
2014-01-23 fa milad0098
2014-02-01 fa_IR Maghsoud
2014-03-10 th_TH chanun
2014-06-14 zh_CN Ji Ma
2014-07-23 lv_LV Sacrosanct
2014-08-05 fi_FI Antti
2014-09-28 cy_GB Aled
2014-10-10 si Zoltán
2014-10-13 sk_SK Richard
2014-10-16 hr Leo
2014-10-23 cs_CZ Larry
2014-10-28 id_ID Justin
2014-10-29 fr_FR Vincent
2014-11-01 ko_KR Josh
2014-11-25 nb_NO Stein-Aksel
2014-11-28 tr_TR Kaya
2014-12-05 zh_TW Peter
2014-12-09 he_IL Ariel
2015-01-03 da_DK Aputsiaĸ
2015-01-10 pt_PT Manuela
2015-01-16 nl_NL HanV
2015-01-27 es_MX Marti
2015-01-27 fr_CA samuelsov
2015-01-27 pt_BR Miro
2015-01-28 ar_EG Mohammad
2015-01-28 ar_SY frances
2015-02-04 pl_PL kalor
2015-02-17 uk_UA Sergiy
2015-02-18 el_GR Vangelis P
2015-02-18 en_GB Andi
2015-02-20 sv_SE Thomas
2015-02-22 bn_BD Suhreed
2015-02-22 hi_IN girdhari
2015-02-22 ru_RU Фёдор
2015-02-26 it_IT Marco
2015-02-27 ca_ES frances
2015-02-27 de_DE Martin
2015-02-27 es_ES frances
2015-02-28 hu_HU Zoltán

The following languages have not been updated in a very long time:

Code: [Select]
af_ZA (Afrikaans) 1% / 181 strings
bg_BG (Bulgarian) 7% / 1219 strings (although I update it sometimes)
es_CO (Spanish of Columbia) 0% -> deleted, probably created by mistake
et_EE (Estonian) 20% / 3389 strings
ht_HT (Haitian Creole) 0%
ja_JP (Japanese) 83% / 14101 strings -> Very weird.. but there doesn't seem to be activity since 2012.
km_KH (Khmer) 1% / 178 strings
lt_LT (Lithuanian) 21% / 1288
ro_RO (Romanian) 11% / 1850
sl_SI (Slovenian) 16% / 2766
sq_AL (Albanian) 33% / 5574
sr_RS@latin (Serbian in Latin letters) 0%
sr_RS (Serbian in Cyrillic) 0%
vi_VN (Vietnamese) 19% / 3334

I'm not sure why the last entries all have Zoltán.. either the script that commits to git had a bug, or in my script, but for the rest it seems representative.

You can also double-check by looking at the "git log" in a specific folder. The reason why I filtered out myself, Piotr or l10n scripts, is to filter out maintenance commits when we push new strings.

Edit: the languages with Zoltán as the last author haven't been updated in a long while, and somehow it ended up showing Zoltán's name. Ex: bg_BG hasn't had a commit by someone else than l10n scripts or me.
« Last Edit: March 05, 2015, 06:49:15 am by mathieu »
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

r4zoli

  • I post occasionally
  • **
  • Posts: 88
  • Karma: 1
  • CiviCRM version: 4.7
  • CMS version: Wordpress
  • MySQL version: 5
  • PHP version: 5
Re: How to tell when last version of a translation was made?
March 05, 2015, 12:39:22 am
I'm the Zoltán, I only edited hu_HU (Hungarian) in transifex. May be my first name accented charachter á cause the problems in scripts, not fully handle utf-8 coding?

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: How to tell when last version of a translation was made?
March 05, 2015, 06:21:38 am
Hi Zoltán,

Sorry about that. It's a bug in my command line combination. The problematic languages were languages that have not been updated in a really long time. Since the script didn't match anyone for the given language (except l10n maintenance commits), it must have taken the last commit in the whole l10n repository. (I didn't really investigate further by lack of time)

I've updated my last post to correct.

Mathieu
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: How to tell when last version of a translation was made?
March 05, 2015, 06:51:13 am
Hmm, this was an interesting exercise.. I updated the stats above for languages not updated recently, and discovered that the Japanese translation, which is at 80%, has not been updated since 2012. It was probably at 100% at some point, but then new strings were not translated.
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • How to tell when last version of a translation was made?

This forum was archived on 2017-11-26.