Hi Polyglots,
WordPress core deals with word counting based on each Locale setting, through the setting Word count type
, which is set in WordPress core translation, in the string words
.
Here is an example for English (UK).
The translation should be words
, characters_excluding_spaces
or characters_including_spaces
.
If none of these is found, words
is the default.
The translation string includes the below context and comments:
Word count type. Do not translate!
If your word count is based on single characters (e.g. East Asian characters), enter ‘characters_excluding_spaces’ or ‘characters_including_spaces’. Otherwise, enter ‘words’. Do not translate into your own language.
I found many Locales with the wrong or no setting. While this isn’t a big problem because it falls back to words
counting type, if you’re a GTE/PTE you should probably check your Locale.
Below is a list of the Locale Teams that have not set or have set it wrong.
These Locales have not set the Word count type
:
#arq, #art_xemoji, #az_TR, #ba, #bho, #brx, #co, #cor, #dv, #ewe, #es_HN, #fo, #fon, #frp, #fuc, #fy, #hat, #hau, #haw_US, #ibo, #ido, #kal, #kin, #, #li, #lij, #lin, #lmo, #mai, #me_ME, #mfe, #mlt, #mri, #nqo, #ory, #os, #pap_AW, #pcd, #art_xpirate, #sa_IN, #scn, #sna, #sq_XK, #srd, #ssw, #su_ID, #syr, #tg, #tuk, #twd, #tzm, #wol, #xho, #zgh, #zh_SG, #zul
These Locales have set wrong the Word count type
:
#af, #ar, #ast, #azb, #bcc, #bn_BD, #bn_IN, #ca, #ckb, #cy, #dzo, #fa_AF, #fur, #ga, #gax, #haz, #hi_IN, #kab, #kmr, #kn, #lug, #lv, #mg_MG, #mk_MK, #ml_IN, #mn, #mr, #ms_MY, #my_MM, #pa_IN, #ps, #rhg, #skr, #snd, #sw, #ta_IN, #ug_CN, #ur
Here is the full list of settings for all Locales that have translation projects on translate.wp.org.
This reminds me that maybe there could be a page for checking the settings for all Locales or per Locale Team, to easily flag strings like text direction (ltr
or rtl
), etc.
Note: The table was updated to fix the links to the Translation Teams and to include string that are pending aproval from an editor.