Plugin Directory


Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#1309 closed defect (fixed)

I18n Improvements

Reported by: dimadin Owned by: josephscott
Priority: normal Severity: major
Plugin: grunion-contact-form Keywords: has-patch
Cc: tracs@…


Attached patch provides almost full i18n of this plugin. Things that are done:

  • marked all strings with gettext functions
  • loaded textdomain and added it to all strings
  • rewrote some parts to enable usage of placeholders
  • added context to some strings which is useful for wpcom where strings from whole code are in one file
  • added translators comments to some strings to give them better description
  • loaded grunion.js via wp_register_script/wp_print_scripts, localized its strings via wp_localized_script, loaded l10n.js since its dependable script
  • added more feedback post type labels since they are shown in UI
  • made several small code improvements

Things that are unresolved:

  • _nx_noop() doesn't accept textdomain so we can't translate strings in it
  • post_content for wp_insert_post() is not i18n since I don't know if its content is used somewhere with functions like preg_match()
  • grunion-blank-screen.php is not used anywhere but it does has a lot of content that needs to be translated so it should be removed if there are no plans to use it

Although I tested this even with translation done from POT I made, it still needs more testing since JavaScript has significant change, and there are some hacks that are changed.

Attachments (4)

grunion-contact-form_i18n.patch (51.3 KB) - added by dimadin 7 years ago.
grunion-contact-form_i18n_2.patch (55.3 KB) - added by dimadin 6 years ago.
grunion-contact-form_i18n_3.patch (55.3 KB) - added by dimadin 6 years ago.
grunion-contact-form_i18n_4.patch (1.7 KB) - added by dimadin 6 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 @dimadin6 years ago

Second patch improves i18n of message that is sent to administrators. Word order in some languages might be different than one used in English so we're improving it as much as possible.

It also fixes an issue where it would send colon (:) alone on a line when one of default fields isn't used.

comment:2 @josephscott6 years ago

See http://wordpress.org/support/topic/plugin-grunion-contact-form-not-i18n-friendly?replies=13#post-2220347 for feedback on this. Basically I just need an updated patch. If that merges ok then I'll commit it to Grunion -trunk and we'll test from there.

comment:3 @dimadin6 years ago

Here is updated patch, I reviewed it and believe that there are no conflicts now.

comment:4 @josephscott6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In [413862]:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:5 @dimadin6 years ago

New patch fixes one typo and removes two lines that somehow came in even though they shouldn't.

comment:6 @josephscott6 years ago

In [414859]:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:7 @josephscott6 years ago

In [440922]:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found
Note: See TracTickets for help on using tickets.