WordPress.org

Ready to get started?Download WordPress

Forums

Grunion Contact Form
Not i18n Friendly (21 posts)

  1. Milan Dinić
    Member
    Posted 3 years ago #

    I am very disappointed that Automatic care less and less about internationalization and localization. This is visible with new version of this plugin too.

    In most parts, gettext functions are not used which makes new contact form modal untranslatable. Even worse is that you hard-coded strings in JavaScript file what will require some rewrites of code to make it i18n (but that is not important since I don't expect that you will ever fix this).

    http://wordpress.org/extend/plugins/grunion-contact-form/

  2. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    Create a Trac ticket and send in a patch, we'll be happy to improve the translation issues. We don't expect this to be the last release we'll ever make :-)

  3. Milan Dinić
    Member
    Posted 3 years ago #

    Create a Trac ticket and send in a patch, we'll be happy to improve the translation issues.

    OK, but you should care about this before you release it in public. It's not just with plugin itself, but its usage on wp.com. Having some English strings in locale site looks very ugly and amateur.

    We don't expect this to be the last release we'll ever make :-)

    I wanted to say that some i18n issues that were reported (long time ago) to Automattic were never fixed.

  4. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    Since this is a plugin, create a new ticket at http://plugins.trac.wordpress.org/ with the keyword of grunion and I'll take a look.

    You are also welcome to let me know directly when it is added via josephscott.org/contact/

    For more good news, someone has already volunteered to come up with some translation improvements and a Japanese translation.

  5. Milan Dinić
    Member
    Posted 3 years ago #

    For more good news, someone has already volunteered to come up with some translation improvements and a Japanese translation.

    I still don't see this in trunk, and I don't want to duplicate work so if possible, please report here when some changes are deployed so that I can look at them.

  6. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    I've asked for this other person to contact you.

    To follow along with changes in -trunk for the plugin you can subscribe to the feed at http://plugins.trac.wordpress.org/log/grunion-contact-form/trunk

  7. RavanH
    Member
    Posted 3 years ago #

    Interesting discussion.

    I noticed that SOME strings are translated but some are not. An example, on a Dutch site the form label 'Name' ( __('Name') ? ) gets translated to 'Naam' which is good. Apparently, it is in the WordPress main MO translation database... But 'Message' is not translated. I suppose that string is NOT in the main translation.

    I think it is a nice approach to use the main WordPress translation database. It avoids depending on plugin translations that keep getting out of date or are just missing. But it only makes sense if the actual translation stings ARE in that main translation database.

    So in the above example, using __('Message') apparently results in an untranslated string but using __('Comment') instead should result in a translated string. Of course we could debate the use of the term 'Comment' against 'Message' or even 'Body' but in the light of internationalization, the choice seems limited:
    Either move to a separate translation domain for the plugin (at least for those strings that are not in the main translation) or limit the plugin to use strings that are in main translation.

    In both cases, I can help out if need be :)

  8. Milan Dinić
    Member
    Posted 3 years ago #

    Nobody contacted me nor there were any improvements made so please tell me should I try to patch it.

  9. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    A patch would be great, tickets can be filed at http://plugins.trac.wordpress.org/ with the keyword Grunion. Currently we have no tickets - http://plugins.trac.wordpress.org/query?status=assigned&status=new&status=reopened&keywords=~grunion&col=id&col=summary&col=status&col=owner&col=type&col=priority&col=component&order=priority

    Make sure patches are against Grunion -trunk.

  10. Milan Dinić
    Member
    Posted 3 years ago #

    I know how to send patches, you don't have a good memory :)

    Here is a ticket with a patch. I wrote all code related stuff over there but would like to add more comments here.

    If you submit any changes, I would like to test it before its released so please create a POT file, its easy to do it in "Admin" tab of plugins page at wp.org.

    Since email notifications don't work on plugins trac, please repost ticket comments here as well (you could ping someone to fix that, BTW).

  11. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    Awesome, I'll reply here when I've had a chance to give that patch a try.

  12. Milan Dinić
    Member
    Posted 3 years ago #

    Bumping this, plus notifying about another ticket I created.

  13. Joseph Scott
    Member
    Plugin Author

    Posted 2 years ago #

    I'm sorry for the huge delay on this. I tried applying your updated patch and it mostly worked:

    patch -p0 < grunion-contact-form_i18n_2.patch
    (Stripping trailing CRs from patch.)
    patching file admin.php
    (Stripping trailing CRs from patch.)
    patching file grunion-blank-screen.php
    (Stripping trailing CRs from patch.)
    patching file grunion-contact-form.php
    Hunk #12 succeeded at 637 (offset 17 lines).
    Hunk #13 succeeded at 650 (offset 17 lines).
    Hunk #14 succeeded at 670 (offset 17 lines).
    Hunk #15 succeeded at 687 (offset 17 lines).
    Hunk #16 succeeded at 723 (offset 17 lines).
    (Stripping trailing CRs from patch.)
    patching file grunion-form-view.php
    Hunk #2 FAILED at 14.
    1 out of 4 hunks FAILED -- saving rejects to file grunion-form-view.php.rej
    (Stripping trailing CRs from patch.)
    patching file js/grunion.js
    Hunk #6 succeeded at 222 (offset 1 line).
    Hunk #7 succeeded at 380 (offset 1 line).
    Hunk #8 succeeded at 418 (offset 1 line).
    Hunk #9 succeeded at 467 (offset 1 line).
    Hunk #10 succeeded at 494 (offset 1 line).
    Hunk #11 succeeded at 504 (offset 1 line).
    Hunk #12 succeeded at 524 (offset 1 line).
    Hunk #13 succeeded at 537 (offset 1 line).
    Hunk #14 succeeded at 631 (offset 1 line).
    Hunk #15 succeeded at 650 (offset 1 line).

    If you update that for the latest Grunion -trunk I'll try it again. If it applies ok I'll commit it, from there we'll try to get a few more people to test it out. If that goes ok then we'll work on pushing out a new version.

  14. Joseph Scott
    Member
    Plugin Author

    Posted 2 years ago #

    Committed your new ticket ( #1349 )

  15. Milan Dinić
    Member
    Posted 2 years ago #

    I updated a patch, sorry for my delay. ;)

  16. Joseph Scott
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you!

    I've committed the updated patch on https://plugins.trac.wordpress.org/ticket/1309 to Grunion -trunk, please test it out to make sure we catch any issues before doing another release. I'm doing some testing and asking a few others to help test as well.

  17. Milan Dinić
    Member
    Posted 2 years ago #

    Great! I made another patch that fixes one typo and removes two unnecessary lines.

    I tested with translation turned on and didn't find any issues related to this changes. There is only a minor thing with _nx_noop() that I already mentioned in ticket when I created a first patch.

    I just found a different issue related to i18n: if you create a form with non Latin characters and then go again to Grunion's screen for that post, preview of a form is sort of broken because of decoding in grunion_ajax_shortcode_to_json().

    If you plan to include translations in a plugin, I can send you mine since I already made it because of testing.

  18. Joseph Scott
    Member
    Plugin Author

    Posted 2 years ago #

    I committed that clean up patch to Grunion -trunk.

    Having Grunion include translations is definitely something we'd consider. Can you post a new ticket and attach your translation to that?

  19. Milan Dinić
    Member
    Posted 2 years ago #

    Sure, here it is.

    Note that files should be placed in folder languages, and that I created POT file manually but you should put one inside folder for other translators.

  20. Joseph Scott
    Member
    Plugin Author

    Posted 2 years ago #

    Those files have been committed to Grunion -trunk. Please give it a try when you have some time.

  21. Johan82
    Member
    Posted 2 years ago #

    Saw that you had this role back to rev 413828 due to the translational changes ended up breaking things. Any news on when this will work again? I'm guessing that many of us want to be able to translate this plugin.

    The funny thing is that it is translated into different languages ​​on wordpress.com what's up with that? Isn't it the same?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic