Messed up messages.mo

Permalink
Hi all

I MIGHT have played with fire... :(

I edited my messages.mo files to tweak it... in a text editor... i NOW know how bad it is...
Before that i did a backup of that file...

So when things went wrong, I put the original in place of the tweaked one...

But things did not go back to normal !!!

Now all text strings translated from EN to FR are kind of offset by a few caracters...
Even though i uploaded messages.mo from the original installation file (concrete5.zip)

Also I can not access the dashboard from topright hand corner icon... i get :
"htmlentities()[function:htmlentities]: invalid multibyte sequence in argument"
I can only get there via full address (http.... index.php/dashboard)

I know i messed up big time and i could end up by starting from scratch...

Thanks a lot for reading !

1 Attachment

cercueilsfmr
View Replies: View Best Answer
mlocati replied on at Permalink Best Answer Reply
mlocati
That's probably due to your .mo files being cached: to solve your issue you can try to manually delete the folder named 0fea6a13c52b4d47 (or something like this) under
/application/files/cache/


Please note that .mo files can't be manually edited: you first need to decompile them to the .po format.
In order to do this you can use this command line:

msgunfmt --output-file=messages.po messages.mo


A messages.po file will be created and you'll be able to edit it with a text editor (or with poedit).
Once you're done, you can re-create the .mo file with this command line:

msgfmt --output-file=messages.mo messages.po


Both the command line tools msgunfmt/msgfmt are part of gettext tools.
If you use Windows, you can find them here:https://mlocati.github.io/gettext-iconv-windows/...
cercueilsfmr replied on at Permalink Reply
cercueilsfmr
Great !

Thanks a lot for your answer

Let's give it a try !!!