• On MacOSX I don’t know how to run msgfmt, hence I can’t make MO files and thus I can’t test my (possible) translation without bothering the developers. Or?
    Is it possible to use po files directly?
    I don’t like not to have the power to test my own translation! Not to say being unable to make a special translation just for myself. Gettext is probably very powerful, I understood that MO files are supposed to be fast working, but I would also like being able to test out PO files directly. Is that possible, at a lower speed … ?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Oops. Broken link. Fink.

    Thread Starter komputist

    (@komputist)

    Well, thank you for this info. But actually I had hope to stay out of Fink. I have never had any luck with it.

    Thread Starter komputist

    (@komputist)

    Actually, you explained how to make a mo out of a po, right? Sorry if I made you think that was what I wanted. The opposit would be more interesting (I now installed Fink ….).

    Thread Starter komputist

    (@komputist)

    No you typed it correctly, I think ?? The good thing is that Gettext is installed with Fink directly, no need to ad it.
    But how shall a proper PO file header look like? I tried to test msgfmt on the de_DE.po file that are online, but I got this message:
    de_DE.po: warning: PO file header missing, fuzzy, or invalid
    warning: charset conversion will not work

    i just updated the de_DE.po file in the WIKI
    https://wiki.www.ads-software.com/index.php/de_DE.po
    there were two “?¤” there which probably caused your problem.
    try again with the updated po file or download the current .mo file from here:
    https://www.ihad.de/download/de_DE.mo
    also, if you find any spelling mistakes or have sugesstions for better translation please send them. thanks.
    eke.

    I wanted to make a .mo-file on my mac, but without have to install Fink or compiling poedit. Som after som googling I found this:
    https://download.videolan.org/pub/videolan/devtools/gettext-macosx.tar.gz
    Unpacking this file results i a number of file, all which I put in /usr/local/lib/ and that was all I needed to make it work. (I had to create the lib/ folder using sudo and also copying the files using sudo.)
    I used it like this:
    /usr/local/lib/msgfmt –statistics -o sv_SE_AdrianB.mo sv_SE_AdrianB.po
    (I’m making my own Swedish translation, hence that file name.)
    I’ve tested the .mo file in my WP blog and it worked.

    Ok, so it worked, but only half-way. I don’t know why, but Swedish characters like ?¥?¤?? doesn’t work. They show up in my WP (1.2 using UTF-8) as strange characters. I don’t know if it because of the version of msgfmt I have, because I use a mac or if it is because of some settings I’ve missed. But I’ll try to dig here in the forums, maybe it’s a well known problem.

    @ AdrianB
    you’ve no proper dtd before your tags including the namespace and this’ll place browsers in quirks mode, which is problematic from the get go. no meta with the charset defined either, you can even define sv as your language in the template directly. might help.
    otherwise not sure.
    cheers-r.

    fatherofpip: I’m not sure I understand what you refer to. I haven’t changes the dtd from the default one that WP uses and it’s exactly the same as the one you’re using on your Swedish preview. And the meta charset is utf-8, as is standard on a WP 1.2 install.

    That anon was me, this being logged out all of a sudden is kind of irritating.

    Yes, that wasn’t my WP install. I removed my home page link in my profile now, so it’s not mistaken for my WP address (which I don’t wan’t to reveal until it’s all set and done).
    The problem shouldn’t relate to the header at all, since you’re Swedish preview is working fine without that extra info. I assume it has someting to do with my own making of a .mo file. Maybe the version of msgfmt is wrong or it is the fact that I use a mac… I really don’t know. But I’ll try that other Swedish file.

    Ok, I tried to make that new sv_SE.po to a .mo and it was the same thing. There is someting in the process of using msgfmt that screws up the Swedish characters. Oh well…

    Yes! I’ve finally figured out how to solve this! This is what I did:
    In BBEdit I opened the .po-file and changed the charset to “utf-8” (from “iso-8859-1”). Then I chose “Encode as Unicode”. Then I unchecked the “Include Byte-Order Mark” and finally I checked the “Use UTF-8 Encoding”.
    Now the .mo file works with all the Swedish characters.

    @ AdrianB
    nice one. though the original .mo was utf-8, odd. maybe i missed something in poedit when creating the catalog. who knows ??
    glad it works.
    did you have to change the cr/lf conversion to suit mac?
    -r.

    Yes, I know the original file was utf-8, so it would have worked if I had set the options mentioned above in my text editor (BBEdit).
    No, I didn’t have to change that, but I’ve set BBEdit to default to unix linebreaks for new documents and I copy and pasted the text from the .po to a new document, so I never had to worry about that.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘MO-woe: how to test my translation?’ is closed to new replies.