• Resolved MCI Desarrollo

    (@mcidesarrollo)


    Good morning, congratulations on your plugin. I’m trying it and it’s very good!!!
    The problem is that the translations do not work correctly.

    I see that there is already a translation into Spanish and I have WP configured in Spanish but in the front the texts continue to appear as “Wind” in English. However, I see that in the file “owm-weather-es_ES.po” the string “Wind” is correctly translated and “Viento” should appear

    To try something else, I have created a new language with “Loco Translate” to add my own translations and I have generated the files owm-weather-es_ES.po and owm-weather-es_ES.mo in the folder /wp-content/languages/ plugins but this doesn’t work either.

    What could be the problem?

    Thank you very much and greetings,
    Carlos

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Uwe Jacobs

    (@uwejacobs)

    Hi Carlos,

    Thanks for your kind words and your translation efforts.

    I made some changes to the textdomain and menu loading order in version 5.1.2. Please update to the new version and try again.

    Also, I gladly add your translation (with acknowledgment) to the plugin once you are done.

    Thanks,
    Uwe

    Thread Starter MCI Desarrollo

    (@mcidesarrollo)

    Hello Uwe, I have updated to the latest version and it has not worked.
    Then I created a new ES language again with “Loco Translate” in the /wp-content/languages/plugins folder and translated several words. Days of the week work when translated but other words don’t work:

    “Thursday” has worked by changing it to “Thursday”. I have also been able to change “Disable cache?” for “Disable cache?” in the back office. So I understand that I have Loco Translate well configured and it is working to translate.
    However there is no change in the front when I change the translation of “Wind”, “Clouds”, “Precipitation”…

    Thank you very much and greetings,
    Carlos

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    That is really odd. There’s another translator (Estonian) who has the same issue. I finished the German translation and for me, it shows up everywhere.

    I’ll continue to look into it. It shouldn’t be that difficult.

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    Try putting your files directly into wp-content/plugins/owm-weather/lang/. Or delete the original owm-weather-es_ES.po/mo files. Maybe that interferes with your new files.

    If that doesn’t work, would you be able to post a screenshot where you don’t see the Spanish translation?

    Thread Starter MCI Desarrollo

    (@mcidesarrollo)

    Hi Uwe, thanks for your quick response and willingness to solve.
    I have removed the .po and .mo files from the /wp-content/languages/plugins folder and put the translation files only in wp-content/plugins/owm-weather/lang/ as you requested.

    I can translate the days of the week correctly but the translations in the rest of the texts still do not work. I can send you a screenshot if you tell me an email.

    Could it be that the plugin is getting those texts directly from the “Open Weather Map” api? and you have not enabled its translation in the textdomain?

    Thread Starter MCI Desarrollo

    (@mcidesarrollo)

    Here is the screenshot

    https://ayuntamiento.mci-desarrollo.es/wp-content/uploads/2022/03/translation_problem.png

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    Thanks for the follow-up and the screenshot, that was very helpful. I created a new version that should address all your issues.

    I found quite a few hardcoded labels and day names. All have been changed so they can be translated. Keep in mind that some of the generic labels like “Wind” or “Humidity” will be several times on the po file; make sure to translate them all.

    For the weather condition description (“cielo claro” on your screenshot) I made a change that affects you. OpenWeatherMap supports only a few major languages without sub-languages. In order to allow a translation for any locale, I pulled the roughly 50 condition descriptions into OWM Weather so anyone can translate them. Take a look at the translation at the end of https://github.com/buche/leaflet-openweathermap/blob/master/leaflet-openweathermap.js. to get started.

    Thread Starter MCI Desarrollo

    (@mcidesarrollo)

    Hi Uwe, it’s great that you solved it so quickly and also created a lot of Spanish translations. Thanks a lot!
    Now almost all the translations that I show on my screen appear. There is only one that keeps appearing untranslated (Wind in the prediction view) I am sending you a screenshot of it.
    https://ayuntamiento.mci-desarrollo.es/wp-content/uploads/2022/03/translation_problem_wind.png

    I have checked if Wind is translated in the .po and yes it is.

    All the best,
    Carlos

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    Hi Carlos,

    That one slipped through. I tested with my German translation but the word ‘Wind’ is the same in both languages. I will provide the fix with the next version.

    Please feel free to change the Spanish translations since most were done automatically by PoEdit. I gladly take your modifications and distribute them in the plugin.

    Thanks!
    Uwe

    Thread Starter MCI Desarrollo

    (@mcidesarrollo)

    Perfect Uwe! For the time being I will disable the “Wind” field and will enable it when you release the next version.

    As for the translations, if I see that I can improve any, I will do it in your plugin instead of in Loco Translate so that other installations in Spanish can benefit.

    Thanks and best regards,
    Carlos

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    Hi Carlos,

    The last missing translation for ‘Wind’ has been fixed with version 5.1.5.

    Thanks again for all your help and the positive review!
    Uwe

    Thread Starter MCI Desarrollo

    (@mcidesarrollo)

    Thank you Uwe! It works perfectly

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Translation does not load correctly’ is closed to new replies.