[wp-hackers] Reusing WordPress translations of strings in a plugin

Otto otto at ottodestruct.com
Mon Sep 2 20:26:57 UTC 2013


Yes, you should use your own text domain for these cases.. for exactly
the reasons you already mentioned.

1. Context matters. We use the word "Delete" in English, and it can
have different meanings based on context. In another language, the
context may make two uses of it into different words entirely.

2. Core can change, leaving your plugin untranslated with an update.
It's unlikely to change for something like "Save", but you never know.

3. Folks doing translations have tools (such as glotpress) to help
them. These make the job of translating somewhat easier, and having a
few extra duplicated strings is not as big a deal as you'd think.
Certainly not as big of a deal as them having to work around your
reuse of a string which may be in a different context.

-Otto


On Mon, Sep 2, 2013 at 3:13 PM, J.D. Grimes <jdg at codesymphony.co> wrote:
> I'm writing a plugin and of course I'm trying to do all of the I18n. I'm coming across some strings that need to be translatable, but that are already translated in WordPress core. What I mean is that, for example, the plugin has button with the text 'Save'. When I wrap this in the I18n functions, is there any reason that I should use the plugin's text domain instead of the default? Since that string will already be translated for WP, is there any reason to make folks translate it again for the plugin? I realize that in some cases, we might have to worry about different contexts, or the string eventually being removed from core. But with things like 'Save', 'Delete', 'Close', etc., is there really any reason to use the plugin's text domain, rather than calling the functions without it?
>
> Thanks.
>
> - J.D.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list