WordPress.org

Ready to get started?Download WordPress

Forums

Translation does not work ok (7 posts)

  1. Anja Fokker
    Member
    Posted 4 years ago #

    I have downloaded wp 2.8 (zip) and translated it in Dutch with poedit. The search terms for poedit I have used are: __ , _e , _c, and _x.
    The _c and _x will be found, but they will not showed.
    Example: Add new in the menu from the Dashboard should be (in Dutch) Nieuwe toevoegen. (That's a searchterm with a _c) in the .php files.

    Is there anyone who can help me with this problem how to resolve it?

  2. geecu
    Member
    Posted 4 years ago #

    This is a quick (and dirty) fix, until someone from wordpress decides to . WordPress 2.8 uses PO contexts, I don't know if xgettext can be used for extracting with contexts and I don't know if poedit supports them. But you can open your file in a simple text editor and add

    msgctxt "post"
    msgid "Add New"
    msgstr "Adăugaţi"

    There are more contexts for "Add New" (file/links/page) and there are other strings with contexts. I think it's easier to download the Czech 2.8 translation (for example) and check there the strings below msgctxt-s.

  3. geecu
    Member
    Posted 4 years ago #

    How do you get your .po files? I understand your initial .po file doesn't have any msgctxt? If you're using gettext you should add
    --keyword=_x:2c,1 to the params to get the strings of the newly added _x function while keeping the context (msgctxt).

  4. Anja Fokker
    Member
    Posted 4 years ago #

    I started once a long, long time ago with WordPress en the .mo and .po file for that version. Every time when there was a new version, I used poEdit and asked poedit 'update from de source texts'(is in Dutch bijwerken vanuit de bronteksten'. It worked allways ok.

    With the WordPress 2.7.1 someone told me the _c has to be added for the searchtterm and indeed terms as 'Add New' will be translated in Dutch to 'Nieuwe toevoegen' and that worked also.

    So the WordPress 2.8 has also new coded words , the _c (which I allready used and the _x, which I foundend in de source .php text, and added tis to the searchwords to poedit.

    Unforttunately, this does not work anymore, not with the _c and not with the _x.

    The other searchterms with tthe __ and _e still works allright.

    But... I should like it for the Dutch users if there is a complete Dutch WordPress Version avialable.

    Because...WordPress is the best (ok,ok that's my opinion)

    With regards Afoka
    (anja from werkgroepen.net/wordpress)

  5. geecu
    Member
    Posted 4 years ago #

    poedit uses xgettext to extract words. So, add

    _x:2c,1

    to the search terms and then "bijwerken vanuit de bronteksten" again :)

    You'll see more "Add New"s there. (or at least you should). Unfortunatelly poedit doesn't show the context of the message, so you won't know which is which (in case you'll want different translations for the different contexts). As I said above, you can always open the file in a text editor if you need it, you'll see them there.

  6. Anja Fokker
    Member
    Posted 4 years ago #

    Geecu: Thanks for your support, but all what i have tried, it does not work. So I have done it manually in a text editor. Lots of work, but it's translated now.

    I have received a link with an article about a bug in poedit, maybe is that the reason why the translation does not work ok for me with poedit.
    http://www.poedit.net/trac/ticket/148

  7. Anja Fokker
    Member
    Posted 4 years ago #

    Geecu (and others): I have found the problem. Normally in poEdit I used 'Update from source code', that does not work anymore.
    I have asked now in poEdit to 'Update from POT-file' and the problem is solved.The whole WordPress 2.8 is now in Dutch.
    Thanks again for your support.

Topic Closed

This topic has been closed to new replies.

About this Topic