[Pywikipedia-bugs] [Maniphest] [Edited] T148121: [CGI template easy task] Find and fix syntax errors in translated messages
Aklapper updated the task description. (Show Details) CHANGES TO TASK DESCRIPTION...* https://translatewiki.net/wiki/Special:Search can be used for [regex](https://en.wikipedia.org/wiki/Regular_expression) search (via [MediaWiki's CirrusSearch extension](https://www.mediawiki.org/wiki/Help:CirrusSearch) and can [filter for MediaWiki messages](https://translatewiki.net/w/i.php?title=Special%3ASearch="" style="padding: 0 2px; color: #33; background: rgba(251, 175, 175, .7);">|filter for MediaWiki messages)TASK DETAILhttps://phabricator.wikimedia.org/T148121EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: AklapperCc: Ebe123, matej_suchanek, Liuxinyu970226, MtDu, PratyyaGhosh, Xqt, pywikibot-bugs-list, Psychoslave, Nikerabbit, Nemo_bis, jayvdb, Aklapper, Wonnral, Bright1055, Baloch007, Toppole69, Mine0901, harikiran, Jayprakash12345, SacredWKnight, Beeyan, D3r1ck01, Srdjan_m, MuhammadShuaib, LNDDYL, Gryllida, Shizhao, Arrbee, KartikMistry, Jay8g___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Edited] T148121: [CGI template easy task] Find and fix syntax errors in translated messages
Aklapper updated the task description. (Show Details) CHANGES TO TASK DESCRIPTIONhttps://translatewiki.net/ contains source and translated messages for many projects, including MediaWiki and many extensions. The source messages often contain syntax that must be preserved in the translated message, per https://translatewiki.net/wiki/Localisation_guidelines; [[https://www.mediawiki.org/wiki/Help:Extension:Translate/Components#Message_checkers|checkers]] are designed to prevent mistakes. Translators occasionally either omit or corrupt the syntax in the translation. This task is to find and fix one translated message in a Wikimedia repository that has incorrect syntax. == UI search == https://translatewiki.net/wiki/Special:SearchTranslations helps find messages searching either the source or the translation, optionally filtered by language and/or repository. https://translatewiki.net/wiki/Special:Search can be used for [[https://www.mediawiki.org/wiki/Help:CirrusSearch|regex search]] and can [[https://translatewiki.net/w/i.php?title=Special%3ASearch="" for MediaWiki messages]]. == Manual search == To find syntax errors in translated messages, fetch the repository containing the translations. Then use tools to look for problems. The simplest tools to use are generic text search programs like `grep`, or . For example, `git clone https://github.com/wikimedia/mediawiki`. In the [[https://github.com/wikimedia/mediawiki/tree/master/languages/i18n | languages/i18n ]] read the `en.json` (English) and `qqq.json` (Description) files to learn about each message. Look for syntax which might become broken by a translator. The variable syntax is `$1`, `$2`, etc. Sometimes translators add a space in the middle, like `$ 1` ``` $ git grep '\$ 1' azb.json: "blockedtext": "' 'ایستیفادهچی آدی و یا آی پی عنوانینیز قاباغی باغلانیب دیر.'\n\nسیزی باغلایان$ 1. الیله اولوب دیر \nباغلاماق سببی:' $ 2.\n\n* باغلانمانین باشلانان زامانی: $ 8\n* باغلانمانین قورتولان زامانی: $ 6\n* باغلانما مدتی: $ 7\n\nگؤستریلن سببه گؤره ائنگئللئنمئنیزین اویغون اولمادیغینی دوشونورسونوزسه، $ 1 یا دا باشقا بیر [[{{MediaWiki:Grouppage-sysop}}|مدیر]] ایله بو وضعیتی گؤروشه بیلرسینیز. [[Special:Preferences|ترجیح لرینیز]] قیسمینده اعتبارلی بیر ائ-پوچت اونوانی گیرمئدیسئنیز \"ایستیفادهچییه ائ-پوچت گؤندر\" خصوصیتینی ایستیفاده ائده، ترجیهلرینیز ایمیل عنوانینیزی علاوه ایمیل گؤندرمک حقوقونا صاحب اولاجاقسینیز.\nبو آنکی باغلانما عنوانینیز $ 3، ائنگئللئنمئ نؤمرهنیز # $ 5.\nبیر ایدارهچیلر وضعیتینیز حاقیندا معلومات آلماق ایستدیگینیزده و یا هر هانسی بیر سورگودا بو معلوماتلار لازیم اولاجاق، خاهیش ائدیریک نوت ائدین.", azb.json: "autoblockedtext": "\n' 'ایستیفادهچی آدی و یا آی پی عنوانینیز قاباغی باغلانیب دیر.'\n\nسیزی باغلایان$ 1. الیله اولوب دیر \nباغلاماق سببی:' $ 2.\n\n* باغلانمانین باشلانان زامانی: $ 8\n* باغلانمانین قورتولان زامانی: $ 6\n* باغلانما مدتی: $ 7\n\nگؤستریلن سببه گؤره ائنگئللئنمئنیزین اویغون اولمادیغینی دوشونورسونوزسه، $ 1 یا دا باشقا بیر [[{{MediaWiki:Grouppage-sysop}}|مدیر]] ایله بو وضعیتی گؤروشه بیلرسینیز. [[Special:Preferences|ترجیح لرینیز]] قیسمینده اعتبارلی بیر ائ-پوچت اونوانی گیرمئدیسئنیز \"ایستیفادهچییه ائ-پوچت گؤندر\" خصوصیتینی ایستیفاده ائده، ترجیهلرینیز ایمیل عنوانینیزی علاوه ایمیل گؤندرمک حقوقونا صاحب اولاجاقسینیز.\nبو آنکی باغلانما عنوانینیز $ 3، ائنگئللئنمئ نؤمرهنیز # $ 5.\nبیر ایدارهچیلر وضعیتینیز حاقیندا معلومات آلماق ایستدیگینیزده و یا هر هانسی بیر سورگودا بو معلوماتلار لازیم اولاجاق، خاهیش ائدیریک نوت ائدین.", azb.json: "file-info-png-repeat": "$1 {{PLURAL:$ 1|دفعه| دفعه}} اویناتیلدی", khw.json: "databaseerror-function": "فنکشن: $ 1", khw.json: "databaseerror-error": "خرابی: $ 1", luz.json: "copyright": "مطلب دومن $ 1 هس نکه خلاف هونو ذکر وابی.", ses.json: "hiddencategories": "Moɲoo woo {{PLURAL:$1|dumi tugante$ 1}} no m'a may:", sq.json:"databaseerror-query": "\nPyetje: $ 1", sq.json:"no-null-revision": "I pamundur krijimi rishikimi i ri për faqen bosh \"$ 1\"", sw.json:"apihelp-no-such-module": "Moduli \"$ 1\" haikupatikana.", ur.json:"databaseerror-function": "فنکشن: $ 1", ur.json:"databaseerror-error": "خرابی: $ 1", ``` Another approach is to look for keywords. For example, the source English message "viewcount" is `"This page has been accessed {{PLURAL:$1|once|$1 times}}."`, which uses the [[ https://www.mediawiki.org/wiki/Help:Magic_words | PLURAL magic word]] which implements [[https://en.wikipedia.org/wiki/Grammatical_number|grammatical number]]. See also [[https://translatewiki.net/wiki/Plural|Plural]] on translatewiki.net. Using grep we can see all of the translations that have omitted the "PLURAL quickly: ```lang=bash $ cd languages/i18n $ grep '"viewcount"' *.json | egrep -v '(qqq.json|PLURAL)' cv.json: "viewcount": "Ку страницăна $1 хут пăхнă.", ff.json: "viewcount": "Ngoo hello yillaama laabi $1.", gan-hans.json: "viewcount": "个页拖人眵嘞$1回。", gan-hant.json: "viewcount": "箇頁拕人眵哩$1回。", gn.json: "viewcount": "Esta página ha sido
[Pywikipedia-bugs] [Maniphest] [Edited] T148121: [CGI template easy task] Find and fix syntax errors in translated messages
jayvdb edited the task description. (Show Details) EDIT DETAILS...If Wikipedia doesn't have the answer, you might look for information about languages on the [[http://linguistics.stackexchange.com/ | Linguistics StackExchange]], such as [[http://linguistics.stackexchange.com/questions/16860/languages-without-plural-markings | this discussion about South-East Asian plurals]]. If you can't find an existing question on Linguistics StackExchange relating to your problem, you can ask a new question on Linguistics StackExchange. This is an== Examples == These are examples of this task being done: * https://translatewiki.net/w/i.php?title=MediaWiki%3APagetitle-view-mainpage%2Fkri=revision=7138660=3536925 * https://translatewiki.net/w/i.php?title=MediaWiki:Tagline/sat=prev=7189500 [list of tools that can help to find these problem]: http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/index.html#quality-assurance...TASK DETAILhttps://phabricator.wikimedia.org/T148121EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jayvdbCc: PratyyaGhosh, Xqt, pywikibot-bugs-list, Psychoslave, Nikerabbit, Nemo_bis, jayvdb, Aklapper, SacredWKnight, Taquo, catalandres, D3r1ck01, MuhammadShuaib, Gryllida, Josve05a, Shizhao, Arrbee, KartikMistry, Jay8g___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Edited] T148121: [CGI template easy task] Find and fix syntax errors in translated messages
jayvdb edited the task description. (Show Details) EDIT DETAILS...If Wikipedia doesn't have the answer, you might look for information about languages on the [[http://linguistics.stackexchange.com/ | Linguistics StackExchange]], such as [[http://linguistics.stackexchange.com/questions/16860/languages-without-plural-markings | this discussion about South-East Asian plurals]]. If you can't find an existing question on Linguistics StackExchange relating to your problem, you can ask a new question on Linguistics StackExchange. == Todo == [explain various types of syntax for various translatewiki.net projects, using cases where there is no automatic detection of the problem yet] [show an example of a fix] This is an example of this task being done: https://translatewiki.net/w/i.php?title=MediaWiki%3APagetitle-view-mainpage%2Fkri=revision=7138660=3536925 [list of tools that can help to find these problem]...TASK DETAILhttps://phabricator.wikimedia.org/T148121EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jayvdbCc: PratyyaGhosh, Xqt, pywikibot-bugs-list, Psychoslave, Nikerabbit, Nemo_bis, jayvdb, Aklapper, SacredWKnight, Taquo, catalandres, D3r1ck01, MuhammadShuaib, Gryllida, Josve05a, Shizhao, Arrbee, KartikMistry, Jay8g___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Edited] T148121: [CGI template easy task] Find and fix syntax errors in translated messages
jayvdb edited the task description. (Show Details) EDIT DETAILS...This task is to find and fix one translated message in a Wikimedia repository that has incorrect syntaxIn the [[https://github.com/wikimedia/mediawiki/tree/master/languages/i18n | languages/i18n ]] read the `en.json` (English) and `qqq.json` (Description) files to learn about each message. Look for syntax which might become broken by a translator. The variable syntax is `$1`, `$2`, etc. Sometimes translators add a space in the middle, like `$ 1` ``` $ git grep '\$ 1' azb.json: "blockedtext": "' 'ایستیفادهچی آدی و یا آی پی عنوانینیز قاباغی باغلانیب دیر.'\n\nسیزی باغلایان$ 1. الیله اولوب دیر \nباغلاماق سببی:' $ 2.\n\n* باغلانمانین باشلانان زامانی: $ 8\n* باغلانمانین قورتولان زامانی: $ 6\n* باغلانما مدتی: $ 7\n\nگؤستریلن سببه گؤره ائنگئللئنمئنیزین اویغون اولمادیغینی دوشونورسونوزسه، $ 1 یا دا باشقا بیر [[{{MediaWiki:Grouppage-sysop}}|مدیر]] ایله بو وضعیتی گؤروشه بیلرسینیز. [[Special:Preferences|ترجیح لرینیز]] قیسمینده اعتبارلی بیر ائ-پوچت اونوانی گیرمئدیسئنیز \"ایستیفادهچییه ائ-پوچت گؤندر\" خصوصیتینی ایستیفاده ائده، ترجیهلرینیز ایمیل عنوانینیزی علاوه ایمیل گؤندرمک حقوقونا صاحب اولاجاقسینیز.\nبو آنکی باغلانما عنوانینیز $ 3، ائنگئللئنمئ نؤمرهنیز # $ 5.\nبیر ایدارهچیلر وضعیتینیز حاقیندا معلومات آلماق ایستدیگینیزده و یا هر هانسی بیر سورگودا بو معلوماتلار لازیم اولاجاق، خاهیش ائدیریک نوت ائدین.", azb.json: "autoblockedtext": "\n' 'ایستیفادهچی آدی و یا آی پی عنوانینیز قاباغی باغلانیب دیر.'\n\nسیزی باغلایان$ 1. الیله اولوب دیر \nباغلاماق سببی:' $ 2.\n\n* باغلانمانین باشلانان زامانی: $ 8\n* باغلانمانین قورتولان زامانی: $ 6\n* باغلانما مدتی: $ 7\n\nگؤستریلن سببه گؤره ائنگئللئنمئنیزین اویغون اولمادیغینی دوشونورسونوزسه، $ 1 یا دا باشقا بیر [[{{MediaWiki:Grouppage-sysop}}|مدیر]] ایله بو وضعیتی گؤروشه بیلرسینیز. [[Special:Preferences|ترجیح لرینیز]] قیسمینده اعتبارلی بیر ائ-پوچت اونوانی گیرمئدیسئنیز \"ایستیفادهچییه ائ-پوچت گؤندر\" خصوصیتینی ایستیفاده ائده، ترجیهلرینیز ایمیل عنوانینیزی علاوه ایمیل گؤندرمک حقوقونا صاحب اولاجاقسینیز.\nبو آنکی باغلانما عنوانینیز $ 3، ائنگئللئنمئ نؤمرهنیز # $ 5.\nبیر ایدارهچیلر وضعیتینیز حاقیندا معلومات آلماق ایستدیگینیزده و یا هر هانسی بیر سورگودا بو معلوماتلار لازیم اولاجاق، خاهیش ائدیریک نوت ائدین.", azb.json: "file-info-png-repeat": "$1 {{PLURAL:$ 1|دفعه| دفعه}} اویناتیلدی", khw.json: "databaseerror-function": "فنکشن: $ 1", khw.json: "databaseerror-error": "خرابی: $ 1", luz.json: "copyright": "مطلب دومن $ 1 هس نکه خلاف هونو ذکر وابی.", ses.json: "hiddencategories": "Moɲoo woo {{PLURAL:$1|dumi tugante$ 1}} no m'a may:", sq.json:"databaseerror-query": "\nPyetje: $ 1", sq.json:"no-null-revision": "I pamundur krijimi rishikimi i ri për faqen bosh \"$ 1\"", sw.json:"apihelp-no-such-module": "Moduli \"$ 1\" haikupatikana.", ur.json:"databaseerror-function": "فنکشن: $ 1", ur.json:"databaseerror-error": "خرابی: $ 1", ``` Another approach is to look for keywords. For example, the source English message "viewcount" is `"This page has been accessed {{PLURAL:$1|once|$1 times}}."`, which uses the [[ https://www.mediawiki.org/wiki/Help:Magic_words | PLURAL magic word]] which implements [[https://en.wikipedia.org/wiki/Grammatical_number|grammatical number]]. See also [[https://translatewiki.net/wiki/Plural|Plural]] on translatewiki.netTASK DETAILhttps://phabricator.wikimedia.org/T148121EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jayvdbCc: PratyyaGhosh, Xqt, pywikibot-bugs-list, Psychoslave, Nikerabbit, Nemo_bis, jayvdb, Aklapper, SacredWKnight, Taquo, catalandres, D3r1ck01, MuhammadShuaib, Gryllida, Josve05a, Shizhao, Arrbee, KartikMistry, Jay8g___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs