Loading


Advertisement:

Author Topic: Problème de traduction du thème Osclass Wizard :(  (Read 563 times)

bastien77

  • Newbie
  • *
  • Posts: 26
Problème de traduction du thème Osclass Wizard :(
« on: October 12, 2016, 03:35:10 pm »
Bonjour,

Je viens vers vous ajd parce que j'ai un problème de traduction avec mon thème... Comme vu dans d'autres posts, j'ai bien télécharger et ajouter les nouveaux fichiers de traduction de mon site, ça a d'ailleurs bien fonctionner mais il me reste un soucis: certaines parties de mon site, comme la zone de recherche, restent non-traduites alors que dans le fichiers ils le sont! C'est comme si la traduction ne s'appliquait pas..
Voici des screenshots de quelques zones où la traduction n'est pas effective.

Merci d'avance pour votre aide. :)

bastien77

  • Newbie
  • *
  • Posts: 26
Re: Problème de traduction du thème Osclass Wizard :(
« Reply #1 on: October 14, 2016, 12:32:50 pm »
Personne a une solution? :(

teseo

  • Hero Member
  • *****
  • Posts: 5598
Re: Problème de traduction du thème Osclass Wizard :(
« Reply #2 on: October 14, 2016, 02:44:04 pm »
Hi,

You can find both of them in osclasswizards/languages/fr_FR/theme.po

"Published date" is included in a bigger context, modify only the string:

Quote
#: item.php:77
#, php-format
msgid "<i class=\"fa fa-calendar-o\"></i> Published date: %1$s"
msgstr ""

Regards

bastien77

  • Newbie
  • *
  • Posts: 26
Re: Problème de traduction du thème Osclass Wizard :(
« Reply #3 on: October 18, 2016, 10:47:27 am »
Hi,

Yes I found it, but it was already translated... so the translation doesn't work and I don't know why... Any supposition? :)

Thx for your last answer ;)

Hi,

You can find both of them in osclasswizards/languages/fr_FR/theme.po

"Published date" is included in a bigger context, modify only the string:

Quote
#: item.php:77
#, php-format
msgid "<i class=\"fa fa-calendar-o\"></i> Published date: %1$s"
msgstr ""

Regards

teseo

  • Hero Member
  • *****
  • Posts: 5598
Re: Problème de traduction du thème Osclass Wizard :(
« Reply #4 on: October 18, 2016, 11:00:44 am »
Hi again

Did you upload modified theme.po and theme.mo? ???

Regards

bastien77

  • Newbie
  • *
  • Posts: 26
Re: Problème de traduction du thème Osclass Wizard :(
« Reply #5 on: October 18, 2016, 11:24:50 am »
Yes I did..

I have a language folder fr_FR with many translation inside (core,index,mail,messages,theme etc..) in /oc-content/languages. And in /oc-content/themes/osclasswizards/languages, I had no folder fr_FR, so I tried to add a folder fr_FR with theme.po and .mo inside but it still doesn't work... :(

teseo

  • Hero Member
  • *****
  • Posts: 5598
Re: Problème de traduction du thème Osclass Wizard :(
« Reply #6 on: October 18, 2016, 11:55:04 am »
Please attach here your /oc-content/themes/osclasswizards/languages/fr_FR/theme.po

bastien77

  • Newbie
  • *
  • Posts: 26
Re: Problème de traduction du thème Osclass Wizard :(
« Reply #7 on: October 18, 2016, 12:20:47 pm »
Here is my theme.po file.
For you info, I just copied the theme.po file of the other language folder and pasted it in /oc-content/themes/osclasswizards/languages/fr_FR to create the fr_FR folder.

I uploaded the theme.po file in .txt because .po is not allowed.

teseo

  • Hero Member
  • *****
  • Posts: 5598
Re: Problème de traduction du thème Osclass Wizard :(
« Reply #8 on: October 18, 2016, 04:13:22 pm »
OsclassWizards 2.0.4, item.php:

Code: [Select]
<?php if ( osc_item_pub_date() !== '' ) { printf__('<i class="fa fa-calendar-o"></i> Published date: %1$s'OSCLASSWIZARDS_THEME_FOLDER), osc_format_dateosc_item_pub_date() ) ); } ?>

The string to be translated:

<i class="fa fa-calendar-o"></i> Published date: %1$s

Your theme.po:

The string that would be translated:

#: item.php:55
msgid "<strong class=\"publish\">Published date</strong>: %1$s"
msgstr "<strong class=\"publish\">Date de publication</strong>: %1$s"

As you can see they are quite different. I'd guess that .po was for an earlier version of the theme. At some point they changed the "strong" element by an "i" and even changed the class on item.php.

Moral for developers: don't include HTML tags on translations, only pure strings. ;)

You'll need to use a decent code editor like Notepad++ to find in which scripts are the untranslated strings and modify the .po accordingly (not only the translation, also the original msgid.

Regards

bastien77

  • Newbie
  • *
  • Posts: 26
Re: Problème de traduction du thème Osclass Wizard :(
« Reply #9 on: October 27, 2016, 11:35:38 pm »
BIG THANKS for your help, but I don't really know how to make the changes about translation code.... #noob

teseo

  • Hero Member
  • *****
  • Posts: 5598