Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Languages/List/doc: Difference between revisions

From Neodyland Wiki
mNo edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
Here as [[:bugzilla:47833]] is still pending.
Previously this module generated a static list like this:
Previously this module generated a static list like this:
{{#tag:pre|{{#invoke:Languages|forEachLanguage
{{#tag:pre|{{#invoke:Languages|forEachLanguage
| before = p.list = {
| before = p.list = {
| pattern = '$lc'
| pattern = '$lc'
| sep = , <nowiki/>
| sep = ,&#32;
| after = '}
| after = }
}}}}
}}}}


Now this list is generated from the internal list of '''supported languages''' in the local instance of MediaWiki.
Now this list is generated from the internal list of '''supported languages''' in the local instance of MediaWiki, which is then sorted by native name of each language in its primary script (LTR scripts are sorted before RTL scripts, language names in the same script are sorted together.
 
The order is also consistant with [[Module:Multilingual description]] which has its own [[Module talk:Multilingual description/sort/testcases|comprehensive tests]] for the sort order of the list, its completeness (all language codes supported by the local instance of Mediawiki, plus some known aliases needed for BCP 47 conformance or for compatibility with past versions of this wiki even if they are not supported now and not shown in the list above), as well as for the directionality of each language.
 
{{tracked|T49137}}
Note that as of 2020-10-18, there's a new bug in Scribunto, which causes the standard "table.sort()" function to no longer accept a standard comparison function. Now when "table.sort()" fails, the error is correctly catched (instead of producing a viabile error), but the list ''may'' not be sorted correctly (temporarily) in some cases. The bug is tracked and corrected in Mediawiki but waiting to be deployed with the fix. Nothing will need to be changed (using "perror()" will then no longer have any effect, it is just needed for now and the bug was not a bug of this module which was properly tested and sudddently failed unexpectedly). Thanks.

Latest revision as of 22:35, 17 October 2020

Previously this module generated a static list like this:

p.list = {'qqq', 'aig', 'sma', 'ace', 'abr', 'ang', 'af', 'gsw', 'als', 'ase', 'smn', 'an', 'rup', 'aae', 'roa-rup', 'frp', 'ast', 'atj', 'gn', 'ay', 'az', 'abs', 'gor', 'id', 'ms', 'bdr', 'bm', 'zh-min-nan', 'nan-latn-pehoeji', 'nan-latn-tailo', 'bjn', 'ban', 'map-bms', 'mui', 'bug', 'btm', 'bbc', 'bbc-latn', 'bew', 'sje', 'bcl', 'bi', 'bol', 'bar', 'bs', 'brh', 'br', 'en-gb', 'ca', 'en-ca', 'cps', 'ceb', 'cs', 'cho', 'ch', 'cbk-zam', 'ny', 'chn', 'sn', 'tum', 'lua', 'sei', 'co', 'cy', 'dga', 'dag', 'da', 'se', 'se-no', 'se-se', 'se-fi', 'pdc', 'de', 'de-formal', 'nv', 'dsb', 'na', 'dua', 'mh', 'et', 'efi', 'vmw', 'egl', 'eml', 'en', 'es', 'es-formal', 'es-419', 'eo', 'ext', 'eu', 'ee', 'wls', 'gur', 'hif', 'fon', 'hif-latn', 'fo', 'fr', 'frc', 'fy', 'ff', 'gaa', 'fur', 'ga', 'gv', 'sm', 'gag', 'gd', 'gl', 'ki', 'aln', 'gpe', 'gom-latn', 'guw', 'hak-latn', 'ha', 'haw', 'ho', 'hoc-latn', 'hsb', 'hr', 'hrx', 'ibb', 'io', 'igl', 'ig', 'rw', 'rn', 'ilo', 'hil', 'ia', 'ie', 'ike-latn', 'ik', 'bto', 'nr', 'xh', 'zu', 'is', 'it', 'iba', 'jv', 'kaj', 'jut', 'kbp', 'kea', 'dtp', 'kl', 'kr', 'pam', 'krl', 'kai', 'csb', 'kw', 'hke', 'krj', 'kiu', 'sw', 'kg', 'avk', 'ses', 'ht', 'gcf', 'kri', 'gcr', 'ku', 'kge', 'ku-latn', 'kus', 'kj', 'acf', 'jbo', 'lld', 'lad', 'lkt', 'ljp', 'ltg', 'la', 'lv', 'lzz', 'to', 'lb', 'nia', 'lt', 'lij', 'li', 'ln', 'lfn', 'liv', 'olo', 'lmo', 'lg', 'yua', 'mad', 'hu', 'hu-formal', 'vmf', 'mg', 'mt', 'mnc', 'mnc-latn', 'mi', 'arn', 'mrh', 'fit', 'isv', 'isv-latn', 'fat', 'min', 'cdo-latn', 'mwl', 'lus', 'mos', 'mus', 'fj', 'nah', 'pcm', 'nap', 'ppl', 'nmz', 'nl', 'nl-informal', 'nds-nl', 'cr', 'yrl', 'niu', 'frr', 'pih', 'nb', 'no', 'nn', 'nrm', 'nov', 'sms', 'nup', 'nys', 'uz-latn', 'uz', 'ann', 'oc', 'ojb', 'frs', 'om', 'nyo', 'ttj', 'ng', 'de-at', 'hz', 'pfl', 'pag', 'ami', 'pap-aw', 'pap', 'jam', 'pcd', 'pms', 'pwn', 'nds', 'pdt', 'cpx-latn', 'pl', 'fvr', 'pt', 'pt-br', 'prg', 'kk-latn', 'aa', 'kaa', 'kk-tr', 'crh', 'crh-latn', 'ty', 'ksh', 'ro', 'rmc', 'rmy', 'rgn', 'rm', 'qug', 'qu', 'nyn', 'xsy', 'szy', 'sg', 'sc', 'sro', 'sas', 'sdc', 'sli', 'de-ch', 'sco', 'trv', 'stq', 'st', 'nso', 'tn', 'sq', 'scn', 'loz', 'simple', 'ss', 'sk', 'sl', 'szl', 'so', 'srn', 'sr-el', 'sh-latn', 'sh', 'su', 'fi', 'sv', 'shy', 'shy-latn', 'shi', 'shi-latn', 'tl', 'zgh-latn', 'kab', 'roa-tara', 'rif', 'tt-latn', 'crh-ro', 'tay', 'tet', 'din', 'vi', 'tg-latn', 'tpi', 'tok', 'chy', 'tly', 've', 'aeb-latn', 'tr', 'tk', 'tru', 'tw', 'kcg', 'ug-latn', 'vot', 'za', 'vec', 'vep', 'ruq-latn', 'ruq', 'vo', 'vro', 'fiu-vro', 'wa', 'wlx', 'bci', 'guc', 'vls', 'war', 'wal', 'wo', 'ts', 'knc', 'yo', 'diq', 'zea', 'sgs', 'bat-smg', 'grc', 'el', 'pnt', 'cop', 'av', 'ady', 'ady-cyrl', 'kbd', 'ba', 'kbd-cyrl', 'alt', 'ab', 'be', 'be-tarask', 'be-x-old', 'bg', 'bxr', 'ruq-cyrl', 'inh', 'dlg', 'os', 'sjd', 'kv', 'krc', 'kum', 'crh-cyrl', 'ky', 'mrj', 'kk', 'kk-cyrl', 'kk-kz', 'lbe', 'lez', 'mk', 'mdf', 'isv-cyrl', 'mo', 'mn', 'rut', 'gld', 'nog', 'ce', 'koi', 'mhr', 'rue', 'rsk', 'ru', 'sah', 'sty', 'cu', 'sr-ec', 'sr', 'sh-cyrl', 'tt-cyrl', 'tt', 'tly-cyrl', 'tg-cyrl', 'tg', 'tyv', 'udm', 'uz-cyrl', 'uk', 'kjh', 'xal', 'cv', 'myv', 'xmf', 'ka', 'hyw', 'hy', 'anp', 'awa', 'ks-deva', 'gom-deva', 'gom', 'dty', 'new', 'pi', 'ne', 'bho', 'bh', 'mag', 'mr', 'mai', 'sa', 'bgc', 'hi', 'as', 'bn', 'bpy', 'pa', 'gu', 'or', 'ta', 'nit', 'te', 'kn', 'tcy', 'ml', 'si', 'syl', 'dz', 'mni', 'bo', 'bug-bugi', 'ksw', 'blk', 'shn', 'kjp', 'mnw', 'my', 'rki', 'ccp', 'km', 'th', 'tdd', 'nod', 'lo', 'ban-bali', 'jv-java', 'sat', 'chr', 'ike-cans', 'iu', 'tzm', 'got', 'zgh', 'shi-tfng', 'tig', 'ti', 'am', 'ii', 'ko-kp', 'ko', 'ja', 'ryu', 'zh', 'zh-mo', 'zh-cn', 'zh-sg', 'zh-hans', 'zh-hant', 'zh-tw', 'zh-hk', 'zh-my', 'wuu-hant', 'wuu', 'wuu-hans', 'hak', 'hak-hant', 'hak-hans', 'lzh', 'zh-classical', 'hsn', 'yue', 'zh-yue', 'yue-hant', 'yue-hans', 'cpx', 'cpx-hant', 'cpx-hans', 'gan', 'gan-hant', 'gan-hans', 'nan', 'nan-hant', 'cdo', 'cdo-hant', 'mnc-mong', 'yi', 'he', 'ug-arab', 'ug', 'ur', 'ary', 'ar', 'bqi', 'ms-arab', 'ps', 'pnb', 'aeb-arab', 'aeb', 'azb', 'arq', 'bcc', 'bgn', 'skr', 'skr-arab', 'sd', 'acm', 'apc', 'fa', 'kk-arab', 'kk-cn', 'ku-arab', 'ks', 'ks-arab', 'khw', 'ckb', 'sdh', 'glk', 'lrc', 'luz', 'lki', 'arz', 'mzn', 'hno', 'arc', 'dv', 'nqo'}

Now this list is generated from the internal list of supported languages in the local instance of MediaWiki, which is then sorted by native name of each language in its primary script (LTR scripts are sorted before RTL scripts, language names in the same script are sorted together.

The order is also consistant with Module:Multilingual description which has its own comprehensive tests for the sort order of the list, its completeness (all language codes supported by the local instance of Mediawiki, plus some known aliases needed for BCP 47 conformance or for compatibility with past versions of this wiki even if they are not supported now and not shown in the list above), as well as for the directionality of each language.

Note that as of 2020-10-18, there's a new bug in Scribunto, which causes the standard "table.sort()" function to no longer accept a standard comparison function. Now when "table.sort()" fails, the error is correctly catched (instead of producing a viabile error), but the list may not be sorted correctly (temporarily) in some cases. The bug is tracked and corrected in Mediawiki but waiting to be deployed with the fix. Nothing will need to be changed (using "perror()" will then no longer have any effect, it is just needed for now and the bug was not a bug of this module which was properly tested and sudddently failed unexpectedly). Thanks.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.