You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe there left only one crucial piece, without which most projects will suffer: domain or context.
Those are:
// domain
dgettext = function ( domain, key )
dngettext = function ( domain, singular_ley, plural_key, value )
// or context
pgettext = function ( context, key )
npgettext = function ( context, singular_key, plural_key, value )
// or both
dpgettext = function ( domain, context, key )
dnpgettext = function ( domain, context, singular_key, plural_key, value )
// or with category
dcgettext = function ( domain, key, category )
dcngettext = function ( domain, singular_key, plural_key, value, category )
dcnpgettext = function ( domain, context, singular_key, plural_key, value, category )
I'm not sure about category. Don't remember I've seen it used somewhere, since usually it's enough to have just context.
Domains (which are, in fact, language codes) aren't interesting for us during extraction, but crucial for output. So, in case of domain jsxgettext should be able to simply skip it.
So, I'd say, it's crucial to have at least context and domains, since without domains it's impossible for devs to load string from specific domain, and without context it's impossible to implement context-aware strings and feminine forms.
Edited: sorry, there were error in domains description. I always forgetting that they are in fact languages, into which string should be outputted)
The text was updated successfully, but these errors were encountered:
Just for the note, there seems to be no sense to implement categories, since it's almost unused and most gettext-outputting libraries will simple ignore it.
ArmorDarks
changed the title
Domain or context function
Domain and context function
Oct 16, 2015
It's great that plurals were finally implemented.
I believe there left only one crucial piece, without which most projects will suffer: domain or context.
Those are:
I'm not sure about category. Don't remember I've seen it used somewhere, since usually it's enough to have just context.
Domains (which are, in fact, language codes) aren't interesting for us during extraction, but crucial for output. So, in case of domain jsxgettext should be able to simply skip it.
So, I'd say, it's crucial to have at least context and domains, since without domains it's impossible for devs to load string from specific domain, and without context it's impossible to implement context-aware strings and feminine forms.
Edited: sorry, there were error in domains description. I always forgetting that they are in fact languages, into which string should be outputted)
The text was updated successfully, but these errors were encountered: