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) »
  • Finnish translation works only partial
Pages: [1]

Author Topic: Finnish translation works only partial  (Read 1826 times)

msysta

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7.7
  • MySQL version: 5.1.56-log
  • PHP version: 5.3.6-pl0-gentoo
Finnish translation works only partial
August 23, 2011, 03:11:36 am
Hi,

I have my locale working only partially. In some places translation does not show up even though it is in the .mo/.po file.

For example there is string "New Individual" that should translate as "Uusi Henkilö" but only the first word is translated, producing hybrid "Uusi Individual". Same bahaviour apply to all strings starting with "New". (New Household --> Uusi Household and so on...)

Inside .po file I see following lines regarding this: (.po file is original downloaded version from official civicrm mirror, I have not touched it)

New %1               Uusi %1
New Individual    Uusi Henkilö

 ??? ???

(btw I hate your captcha)
« Last Edit: August 23, 2011, 03:13:40 am by msysta »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Finnish translation works only partial
September 11, 2011, 03:55:41 am
It's probably that "Individual" is taken directly from the contact type and not translated.

Can you check the name of the contact types? Are they translated?

Otherwise, you will need to dig through the code to see where the untranslated string comes form

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

gastrit

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 2
  • CiviCRM version: 4.2.2
  • CMS version: 7.8
  • MySQL version: 5.1.41
  • PHP version: 5.3.2
Re: Finnish translation works only partial
October 19, 2011, 05:16:18 am
Terve! I have the same problem for my swedish translations. I haven't found out how to fix the real problem but here is two workarunds:

1. Change the title field in the database table civicrm_menu (try this select id, title from civicrm_menu where title = 'New Individual';)

2. Use word replacements (Administer->Option Groups->Word Replacements). Note that this overrides your .po-translations

But something is weird here because most of these page title and headers are actually being translated but some of them not, although all of them exists in my .po-file. I have searched in the code but can't find out why New Activity is translated but not New Member. Does anyone have a clue why or where to look?

Heipa hei, Jonas

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Finnish translation works only partial
October 19, 2011, 06:43:43 am

hey gastrit:

wanna jump on irc and maybe we can try to figure out this issue and hopefully solve it.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Finnish translation works only partial
October 19, 2011, 07:41:54 am

so my guess right now, is a bug in the localizing of the menu title.

Can you check:

CRM/Core/Menu.php, function get

specifically the call here: $i18n->localizeTitles($menuPath);

thanx

lobo


A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

gastrit

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 2
  • CiviCRM version: 4.2.2
  • CMS version: 7.8
  • MySQL version: 5.1.41
  • PHP version: 5.3.2
Re: Finnish translation works only partial
October 20, 2011, 02:11:37 am
I've looked in CRM/Core/ in the files Invoke.php, Menu.php and Page.php but I can't find anything that seems wrong. I also tried to hardcode the title to "FOO" at some places but it seems to have no effect. I see that the title is set in many other files as well, for example in CRM/Contact/Form/Contact.php:
CRM_Utils_System::setTitle( ts( 'New %1', array( 1 => $typeLabel ) ) );

One odd thing that I didn't mentioned earlier is that the correct translations shows up in the menu but not in page title. And  there are no translations in the table civicrm_navigation

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Finnish translation works only partial
October 20, 2011, 06:16:08 am

did the function localizeTitles return the right translated value for "New Member" when called from Menu.php? (approx line 404)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Finnish translation works only partial

This forum was archived on 2017-11-26.