Translate problems - missing strings

Hi,

Trying to integrate Directory plugin to my theme, and having translating problems:
There are 2 language files in the languages folder (which I had duplicated and gave my language extension), but it seems not everything could be translated there:
directory-default.po
dr_text_domain.po

I couldn't find how to translate the following strings:

1. Listings – main directory page title
2. Listing Category – directory category page title
3. Edit | Delete | Preview – my listing page
4. Add Listing – add listing page title
5. Edit Listing – edit listing page title

Add/Edit Listing page - the following strings (labels & discriptions):
1. All Listing Categories – found at both translating files but nothing changed in the page after translating
2. Listing Tags – found at directory-default.po, but nothing changed in the page after translating
3. Add or remove listing categories – not found
4. Add or remove listing tags – not found
5. Status – not found
I can find & change these strings at page-update-listing.php - but it doesn't seem the right way (If I will want to update plugin)

single-listing
- all labels and required at contact publisher form (no problem with descriptions, though)
- the word "Review" above comment

Rating
couldn’t' find where to translate, only at ratings.php at core folder.

Thanks,

Naomi

  • aecnu
    • WP Unicorn

    Greetings Naomi,

    Welcome to WPMU DEV!

    Sorry to see that you are having trouble translating some of the items within the Directory plugin and I admit that I do not know why or what we can possibly do to straighten out the missing? items.

    Therefore I will see if I can get the lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Arnold
    • El Macho WP

    There is a third language file in directory/core/custompress/languages.

    Also a lot of the category stuff is not in Transaltion files but in the CustomPress settings. Labels section in Post Types and Taxonomy and custom fields.
    and spot check ing things like "Edit" "Delete" "Preview" show up in the dr_text_domain.po. Were they translated?

    Note the finaly names of the .mo files would be

    directory.mo
    dr_text_domain.mo
    custompress.mo

  • nl2
    • Design Lord, Child of Thor

    Thank you Joe! Thank you Arnold!!

    I use Poedit for language files, so I do have .mo files (which had been created automaticly).

    I did find Edit | Delete | Preview at dr_text_domain.po, as you, Arnold, said. I'm sorry I missd that before.

    I don't have problems with Custoppress custom fields (which I had added to add/edit listing page), since I use fields' names with my language.

    Still don't have any idea how to translate few pages titles that are very important! (Listings, Listing Category, Add Listing, Edit Listing)

    Also I don't understand why at Add/Edit Listing page there are few strings that are not changed after translating. All labels and description in this page are in dr_text_domain.po. Almost all of them had been changed perfectly after translating, but there are few strings that don't get the translating change and I can't understand why. These are the strings that are not being effected although they are translated exactly the same as other strings in that page:
    1. Listing Tags
    2. All Listing Categories
    3. Add or remove listing tags
    4. Add or remove listing categories

    Also I didn't find how to translate labels at single-listing page (contact publisher form). (I could do it in the file itself, but don't think it is recommended).

    Thanks

    Naomi

  • nl2
    • Design Lord, Child of Thor

    Thank you Arnold, so much!

    The only thing I Still don't find is where to translate "Add Listing" "Edit Listing" page titles.
    I find these strings (twice): "Add Listing" + "Edit Listing" but the translate is not working.On both
    directory-default.po
    dr_text_domain.po

    I did found and translated "Listing Category" and "Listing" page titles (on CastomPress - Post Type Tab).

    I also found missing strings (regarding tags & categories) on Add/Edit Listing page (on CastomPress - Taxonomies Tab - on "listing_tag" & "listing_category").

    You are absolutely right regarding contact form labels. Somehow I missed that too, and I would like to apologize...

    Thanks again,

    Naomi

  • nl2
    • Design Lord, Child of Thor

    ops...
    Still small last thing -comment/review title:
    "Review"
    translate doesn't work both on
    directory-default.po
    dr_text_domain.po
    I can change it at core.php, but I'm not sure this is the right way.

    Also where should I translate rating? Directly on rating.php?

  • nl2
    • Design Lord, Child of Thor

    Hi,

    Somehow I found that If I remove the "x" from core.php line 158
    (. _x( 'Review', $this->text_domain )
    And replace it with underscore
    __( 'Review', $this->text_domain ) .
    the translation on dr_text_domain-he_IL.po – does work.

    While continue translating, I also found that in sign up page, there are 2 strings missing on dr_text_domain-he_IL.po:
    <h3>Lose something?</h3>
    <p>Enter your username or email to reset your password.</p>
    Lines 128-129 on page-signin.php

    It should be somthin like:
    <h3><?php _e('Lose something?!', $this->text_domain); ?></h3>
    <p><?php _e('Enter your username or email to reset your password.', $this->text_domain); ?></p>
    And also should be added the strings to .po file.

    It might help someone else…

    Still not sure about rating translation.

    Naomi

  • nl2
    • Design Lord, Child of Thor

    Hi,

    I have noticed that after I had changed (translate) virtual pages Add/Edit listing, the page titles are ok now, but the 2 pages are not in virtual pages list anymore and I don't have any idea how to move them back there. They have also been added to dropdown listing menu (they were not there before)

    Naomi

  • nl2
    • Design Lord, Child of Thor

    Where can I find it (rating fix)?
    What should I do next, in order to be able to translate it (Not directly on rating.php)?

    Also, what about the virtual pages (add/edit listing)?
    I found that if I translate page title directly on mysql – wp_post table, it stay virtual, but if I change it on admin-pages - it turns to be not virtual any more. Is there a better way to do that?

  • nl2
    • Design Lord, Child of Thor

    I have installed the new version 2.2.1.7.
    It seems that there are much more strings available for translate than before.
    It is also much more convenient to have all the translation in one .po file.
    Thank you!

    Still have few problems…

    The following strings although translated on the .po file – translation is not displayed:
    - You must be logged in to rate item – translate is not displayed
    - Excellent, great, good, quiet good, not so great
    (other rating strings seems ok)

    Also when trying to get to my-listings page (not looged in, means signin page) I get the following error:
    Parse error: syntax error, unexpected T_VARIABLE in …\wp-content\plugins\directory\ui-front\general\page-signin.php on line 128

  • Arnold
    • El Macho WP

    on line 128 there's missing comma

    <h3><?php _e('Lose something?', $this->text_domain); ?></h3>

    As for the quality strings, they are in the dr_text_domain.po. A search only shows one place where they are used and it's translated. Can't find anything wrong with it.

    The rate item call was missing a text domain in the call so it would have defaulted out to the wordpress translation. Fixed that.

    Try the attached version

  • nl2
    • Design Lord, Child of Thor

    From what I have checked until now, the following translations work perfect:
    - Signin & signup - (no error message + translate is perfect)
    - Review
    - You must be logged in to rate item

    Still rating items (good, quiet good…) - translated in .po file but didn't change on the front site. I don't know how to fix it.

    I'm not sure I have finished translating everything yet, and I am going to keep working…
    but your help and fix are great and I hope it is almost done….

  • nl2
    • Design Lord, Child of Thor

    On page-signin.php there is a small mistake on line 39 ("Check your email for the password and then return to log in") which prevent this string translating works:

    <p><?php _e('Check your email for the password and then return to log in.', $this-text_domain); ?></p>

    Replace with:
    <p><?php _e('Check your email for the password and then return to log in.', $this->text_domain); ?></p>

    Arrow instead of dash before "text_domain"

  • nl2
    • Design Lord, Child of Thor

    found it!
    (missing brackets at the end of the string) line 23:

    add_action( 'init', array(&$this, 'init');

    Replace with
    add_action( 'init', array(&$this, 'init'));

    Now it's working!!!!

    Is it ok not to close this discussion?
    I have not translated everything yet….
    (hope this is the last thing to fix… but I'm not sure about it…)

  • aecnu
    • WP Unicorn

    Greetings Naomi,

    It appears this particular topic is now resolved/closed, if you need any further assistance please let us know.

    If it wasn't resolved, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Thank you for being a WPMU Dev Community Member and have a GREAT upcoming weekend!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.