Support » Plugin: Book Review Library » Translation in FR

  • arnaudstratogene

    (@arnaudstratogene)



    Hello,

    I would like translate “Ce livre est en stock” par “Ce livre est disponible” and “Ce livre est emprunté” in “Ce livre est épuisé”, but when I modify the file lang, nothing is happening. Can you help me please ?
    Thanks !

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Chris Reynolds

    (@jazzs3quence)

    What are you using for your translation? Just editing the .po file doesn’t change anything because it’s the .mo file that needs to be compiled to be machine-readable.

    arnaudstratogene

    (@arnaudstratogene)

    Hello !

    Thanks !

    Yes, I edit the .po file and compiled it in .mo.
    Then, I replace the .mo and .po files in the FTP (book-review-library-fr_FR.mo).

    Is it OK ?

    Thank you very much !

    Plugin Author Chris Reynolds

    (@jazzs3quence)

    That sounds right. Possibly try uploading your .po/.mo files to /wp-content/languages/plugins. If there isn’t a /plugins folder, create one and drop your files in. There were updates to how WordPress loads language files made a while ago and I am guessing if it’s not reading your files from the plugin, it’s reading the translations from there. If that doesn’t work, let me know and I will do some testing but I am away from my computer for the next couple days.

    arnaudstratogene

    (@arnaudstratogene)

    Hello,

    Thank you for your reply. I did as you suggest, but that does not seem to work either …

    Plugin Author Chris Reynolds

    (@jazzs3quence)

    Okay I will check this when I get home but in the meantime I’d be kicking myself if I didn’t ensure that you are using the French localized version of WordPress. If the locale isn’t set it won’t work. I don’t think this is the case but I wanted to make sure.

    Plugin Author Chris Reynolds

    (@jazzs3quence)

    Hello! 👋

    So I had a chance to test this today on my local machine. I can confirm that uploading the language files to wp-content/languages does not work. This is because the plugin is loading languages from its own language files internally (although there are translations on the WordPress translations site).

    However, when I made the changes locally using Poedit and then used the “Compile to MO” function, my edited translations worked as expected when the updated versions were uploaded to wp-content/plugins/book-review-library/lang. Screenshots below:


    The edited translations in Poedit


    The book is not in stock


    The book is in stock

    The only thing I could tell you to check is that the .po file was compiled to .mo and that they are in the correct location. However, one thing I need to do on my end is to make sure that the plugin supports language files uploaded to the global wp-content/languages/ folder which I will open a ticket for.

    It is also possible that the translation program you are using did not name the .mo file correctly or there was some other issue that made your experience different from mine.

    • This reply was modified 5 days, 12 hours ago by  Chris Reynolds.
    • This reply was modified 5 days, 12 hours ago by  Chris Reynolds. Reason: additional info
    arnaudstratogene

    (@arnaudstratogene)

    Hello Chris,

    Thank you so much !

    I did as you suggest, but it does not work.
    Can I send you screenshots ?

    Do you know what that can come from?

    Thank you !

    Plugin Author Chris Reynolds

    (@jazzs3quence)

    Screenshots would be helpful because at this time, I’m out of ideas. I can work on a quick patch to check the main wp-content/languages folder and push that up to see if it helps your issue, but beyond that, I’m not sure what else to suggest.

    What program are you using for your translations? It may be something specific to that or where that program saves files by default.

    Hello,

    Thank !

    How can I send you screenshots ?

    For my translations, I’m using POEdit.
    It’s the same probleme with the plugin Loco Translate for example in WordPress.

    Thank you !

    Plugin Author Chris Reynolds

    (@jazzs3quence)

    I have a free account on Imgur that I used for the screenshots above, but if you didn’t want to set up a new account somewhere and have access to Dropbox or Google Drive, you can upload your images there and post links.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.