TGMPA / TGM-Plugin-Activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install, update and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference bundled plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.
http://tgmpluginactivation.com/
GNU General Public License v2.0
1.76k stars 431 forks source link

Mo files are not well generated #752

Open Tofandel opened 6 years ago

Tofandel commented 6 years ago

Hi,

I noticed today that the mo files are not well compiled (at least for the french language)

The singular and plurals are concatenated together so I checked the po file and everything is in order, I recompiled it with poedit and then the translations started displaying correctly

I can provide the newly compiled mo file for Fr and other languages that might have the same issue as well if needed.

To reproduce => install a plugin with the latest version of tgmpa, requiring another plugin, with wordpress in french, And notice that the string for "Begin to install the plugin" is : "Commencer à installer l'extensionCommencer à installer les extensions" instead of just "Commencer à installer l'extension"

franzarmas commented 6 years ago

Indeed, I have the same problem for the Spanish language (es_ES).

I also did the check with Poedit and after the compilation the translations start to work.

Please solve this in the future version.

jrfnl commented 6 years ago

@Tofandel @franzarmas We normally update the .po(t) files before each new release and regenerate the translation .mo files after translators have submitted any updates they want to provide. I'd be very happy if you'd be willing to test those files before we release the next version to prevent this issue.

Tofandel commented 6 years ago

@jrfnl What tool do you use to regenerate them ?

jrfnl commented 6 years ago

@Tofandel If I remember correctly I used PoEdit originally, but the last batch may have been generated using https://github.com/phpmo/php.mo It's been a while, so not entirely sure at the moment.

cdmmultimedia commented 5 years ago

We are having the same problem (i.e. weird plurals and singular sentences cobbled up together, and some translations falling back to the default). Regenerating the .mo files from the .po files fixed the issue.

cdmmultimedia commented 5 years ago

The library that you're mentioning seems to be no longer maintained. Do you need help with getting a reliable CI-enabled generation of the .mo files ?

jrfnl commented 5 years ago

@cdmmultimedia Help setting that up or even just documenting how we can do this easily in bulk would be awesome!

cdmmultimedia commented 5 years ago

@jrfnl We'd be happy to look into it :)

jrfnl commented 5 years ago

@cdmmultimedia Much appreciated! When you do, please keep in mind that maintainers may be on varying OS-es, i.e. both Linux/Mac as well as Windows will need to be supported.