From b3b7be4e851efda49dd8173ee34428e60ad0a20c Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 16 Dec 2007 20:18:33 +0000 Subject: [PATCH] Changed messages to be a more standard format, to help localization with BetaWiki et al., at request of siebrand. Thanks to help from siebrand. All Cite parser tests pass. --- Cite.i18n.php | 653 ++++++++++++++++++-------------------------- Cite.php | 85 ++---- citeParserTests.txt | 13 +- 3 files changed, 302 insertions(+), 449 deletions(-) diff --git a/Cite.i18n.php b/Cite.i18n.php index ed2f15a5..fd7a11a7 100644 --- a/Cite.i18n.php +++ b/Cite.i18n.php @@ -5,31 +5,29 @@ * @addtogroup Extensions */ -$wgCiteMessages = array(); +$messages = array(); -$wgCiteMessages['en'] = array( +$messages['en'] = array( /* Debug and errors */ # Internal errors - 'cite_croak' => 'Cite croaked; $1: $2', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Internal error; invalid $str and/or $key. This should never occur.', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Internal error; invalid stack key. This should never occur.', + 'cite_croak' => 'Cite croaked; $1: $2', + 'cite_error_key_str_invalid' => 'Internal error; invalid $str and/or $key. This should never occur.', + 'cite_error_stack_invalid_input' => 'Internal error; invalid stack key. This should never occur.', # User errors - 'cite_error' => 'Cite error $1; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Invalid <ref> tag; name cannot be a simple integer, use a descriptive title', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Invalid <ref> tag; refs with no content must have a name', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Invalid <ref> tag; invalid names, e.g. too many', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Invalid <ref> tag; refs with no name must have content', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Invalid <references> tag; no input is allowed, use + 'cite_error' => 'Cite error: $1', + 'cite_error_ref_numeric_key' => 'Invalid <ref> tag; name cannot be a simple integer, use a descriptive title', + 'cite_error_ref_no_key' => 'Invalid <ref> tag; refs with no content must have a name', + 'cite_error_ref_too_many_keys' => 'Invalid <ref> tag; invalid names, e.g. too many', + 'cite_error_ref_no_input' => 'Invalid <ref> tag; refs with no name must have content', + 'cite_error_references_invalid_input' => 'Invalid <references> tag; no input is allowed, use <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Invalid <references> tag; no parameters are allowed, use <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "Ran out of custom backlink labels, define more in the \"''cite_references_link_many_format_backlink_labels''\" message", - 'cite_error_' . CITE_ERROR_REFERENCES_NO_TEXT => 'No text given.', + 'cite_error_references_invalid_parameters' => 'Invalid <references> tag; no parameters are allowed, use <references />', + 'cite_error_references_no_backlink_label' => "Ran out of custom backlink labels, define more in the \"''cite_references_link_many_format_backlink_labels''\" message", + 'cite_error_references_no_text' => 'No text given.', /* Output formatting @@ -56,394 +54,285 @@ $wgCiteMessages['en'] = array( 'cite_references_prefix' => '
    ', 'cite_references_suffix' => '
', ); -$wgCiteMessages['cs'] = array( - /* - Debug and errors - */ - # Internal errors - 'cite_croak' => 'Nefunkční citace; $1: $2', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Vnitřní chyba; neplatný $str', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Vnitřní chyba; neplatný klíč zásobníku', - - # User errors - 'cite_error' => 'Chybná citace $1; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Chyba v tagu <ref>; názvem nesmí být prosté číslo, použijte popisné označení', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Chyba v tagu <ref>; prázdné citace musí obsahovat název', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Chyba v tagu <ref>; chybné názvy, např. je jich příliš mnoho', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Chyba v tagu <ref>; citace bez názvu musí mít vlastní obsah', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Chyba v tagu <references>; zde není dovolen vstup, použijte <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Invalid <references> tag; no parameters are allowed, use <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "Došla označení zpětných odkazů, přidejte jich několik do zprávy „''cite_references_link_many_format_backlink_labels''“", +/** Czech (Česky) */ +$messages['cs'] = array( + 'cite_croak' => 'Nefunkční citace; $1: $2', + 'cite_error_key_str_invalid' => 'Vnitřní chyba; neplatný $str', + 'cite_error_stack_invalid_input' => 'Vnitřní chyba; neplatný klíč zásobníku', + 'cite_error' => 'Chybná citace $1; $2', + 'cite_error_ref_numeric_key' => 'Chyba v tagu <ref>; názvem nesmí být prosté číslo, použijte popisné označení', + 'cite_error_ref_no_key' => 'Chyba v tagu <ref>; prázdné citace musí obsahovat název', + 'cite_error_ref_too_many_keys' => 'Chyba v tagu <ref>; chybné názvy, např. je jich příliš mnoho', + 'cite_error_ref_no_input' => 'Chyba v tagu <ref>; citace bez názvu musí mít vlastní obsah', + 'cite_error_references_invalid_input' => 'Chyba v tagu <references>; zde není dovolen vstup, použijte <references />', + 'cite_error_references_no_backlink_label' => "Došla označení zpětných odkazů, přidejte jich několik do zprávy „''cite_references_link_many_format_backlink_labels''“", ); -$wgCiteMessages['de'] = array( - # Internal errors - 'cite_croak' => 'Fehler im Referenz-System. $1: $2', - 'cite_error' => 'Referenz-Fehler $1: $2', - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Interner Fehler: ungültiger $str', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Interner Fehler: ungültiger „name“-stack', - - # User errors - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Ungültige -Verwendung: „name“ darf kein ' . - 'reiner Zahlenwert sein, benutze einen beschreibenden Namen.', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Ungültige -Verwendung: „ref“ ohne Inhalt muss einen Namen haben.', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Ungültige -Verwendung: „name“ ist ungültig oder zu lang.', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Ungültige -Verwendung: „ref“ ohne Namen muss einen Inhalt haben.', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Ungültige -Verwendung: Es ist kein zusätzlicher Text erlaubt, ' . - 'verwende ausschließlich .', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Ungültige -Verwendung: Es sind keine ' . - 'zusätzlichen Parameter erlaubt, ' . - 'verwende ausschließlich .', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => 'Eine Referenz der Form wird öfter ' . - 'benutzt als Buchstaben vorhanden sind. Ein Administrator muss [[MediaWiki:cite references link many format backlink labels]] um weitere Buchstaben/Zeichen ergänzen.', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_TEXT => 'Eine Referenz der Form wird verwendet, ohne definiert worden zu sein.', +/** German (Deutsch) */ +$messages['de'] = array( + 'cite_croak' => 'Fehler im Referenz-System. $1: $2', + 'cite_error_key_str_invalid' => 'Interner Fehler: ungültiger $str', + 'cite_error_stack_invalid_input' => 'Interner Fehler: ungültiger „name“-stack', + 'cite_error' => 'Referenz-Fehler $1: $2', + 'cite_error_ref_numeric_key' => 'Ungültige -Verwendung: „name“ darf kein reiner Zahlenwert sein, benutze einen beschreibenden Namen.', + 'cite_error_ref_no_key' => 'Ungültige -Verwendung: „ref“ ohne Inhalt muss einen Namen haben.', + 'cite_error_ref_too_many_keys' => 'Ungültige -Verwendung: „name“ ist ungültig oder zu lang.', + 'cite_error_ref_no_input' => 'Ungültige -Verwendung: „ref“ ohne Namen muss einen Inhalt haben.', + 'cite_error_references_invalid_input' => 'Ungültige -Verwendung: Es ist kein zusätzlicher Text erlaubt, verwende ausschließlich .', + 'cite_error_references_invalid_parameters' => 'Ungültige -Verwendung: Es sind keine zusätzlichen Parameter erlaubt, verwende ausschließlich .', + 'cite_error_references_no_backlink_label' => 'Eine Referenz der Form wird öfter benutzt als Buchstaben vorhanden sind. Ein Administrator muss [[MediaWiki:cite references link many format backlink labels]] um weitere Buchstaben/Zeichen ergänzen.', + 'cite_error_references_no_text' => 'Eine Referenz der Form wird verwendet, ohne definiert worden zu sein.', ); -$wgCiteMessages['fr'] = array( - # Internal errors - 'cite_croak' => 'Citation corrompue ; $1 : $2', - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Erreur interne ; $str attendue', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Erreur interne ; clé de pile invalide', - - # User errors - 'cite_error' => 'Erreur de citation $1 ; $2', - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Appel invalide ; clé non-intégrale attendue', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Appel invalide ; aucune clé spécifiée', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Appel invalide ; clés invalides, par exemple, trop de clés spécifiées ou clé erronée', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Appel invalide ; aucune entrée spécifiée', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Entrée invalide ; entrée attendue', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Arguments invalides ; argument attendu', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "Exécution hors des étiquettes personnalisées, définissez plus dans le message « cite_references_link_many_format_backlink_labels »", - 'cite_error_' . CITE_ERROR_REFERENCES_NO_TEXT => 'Aucun texte indiqué.', +/** French (Français) */ +$messages['fr'] = array( + 'cite_croak' => 'Citation corrompue ; $1 : $2', + 'cite_error_key_str_invalid' => 'Erreur interne ; $str attendue', + 'cite_error_stack_invalid_input' => 'Erreur interne ; clé de pile invalide', + 'cite_error' => 'Erreur de citation $1 ; $2', + 'cite_error_ref_numeric_key' => 'Appel invalide ; clé non-intégrale attendue', + 'cite_error_ref_no_key' => 'Appel invalide ; aucune clé spécifiée', + 'cite_error_ref_too_many_keys' => 'Appel invalide ; clés invalides, par exemple, trop de clés spécifiées ou clé erronée', + 'cite_error_ref_no_input' => 'Appel invalide ; aucune entrée spécifiée', + 'cite_error_references_invalid_input' => 'Entrée invalide ; entrée attendue', + 'cite_error_references_invalid_parameters' => 'Arguments invalides ; argument attendu', + 'cite_error_references_no_backlink_label' => 'Exécution hors des étiquettes personnalisées, définissez plus dans le message « cite_references_link_many_format_backlink_labels »', + 'cite_error_references_no_text' => 'Aucun texte indiqué.', ); -$wgCiteMessages['he'] = array( - /* - Debug and errors - */ - # Internal errors - 'cite_croak' => 'בהערה יש שגיאה; $1: $2', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'שגיאה פנימית; $str שגוי', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'שגיאה פנימית; מפתח שגוי בערימה', - - # User errors - 'cite_error' => 'שגיאת ציטוט $1; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'תגית <ref> שגויה; שם לא יכול להיות מספר פשוט, יש להשתמש בכותרת תיאורית', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'תגית <ref> שגויה; להערות שוליים ללא תוכן חייב להיות שם', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'תגית <ref> שגויה; שמות שגויים, למשל, רבים מדי', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'תגית <ref> שגויה; להערות שוליים ללא שם חייב להיות תוכן', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'תגית <references> שגויה; לא ניתן לכתוב תוכן, יש להשתמש בקוד <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'תגית <references> שגויה; לא ניתן להשתמש בפרמטרים, יש להשתמש בקוד <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "נגמרו תוויות הקישורים המותאמים אישית, אנא הגדירו נוספים בהודעת המערכת \"''cite_references_link_many_format_backlink_labels''\"", - 'cite_error_' . CITE_ERROR_REFERENCES_NO_TEXT => 'לא נכתב טקסט.', +/** Hebrew (עברית) */ +$messages['he'] = array( + 'cite_croak' => 'בהערה יש שגיאה; $1: $2', + 'cite_error_key_str_invalid' => 'שגיאה פנימית; $str שגוי', + 'cite_error_stack_invalid_input' => 'שגיאה פנימית; מפתח שגוי בערימה', + 'cite_error' => 'שגיאת ציטוט $1; $2', + 'cite_error_ref_numeric_key' => 'תגית <ref> שגויה; שם לא יכול להיות מספר פשוט, יש להשתמש בכותרת תיאורית', + 'cite_error_ref_no_key' => 'תגית <ref> שגויה; להערות שוליים ללא תוכן חייב להיות שם', + 'cite_error_ref_too_many_keys' => 'תגית <ref> שגויה; שמות שגויים, למשל, רבים מדי', + 'cite_error_ref_no_input' => 'תגית <ref> שגויה; להערות שוליים ללא שם חייב להיות תוכן', + 'cite_error_references_invalid_input' => 'תגית <references> שגויה; לא ניתן לכתוב תוכן, יש להשתמש בקוד <references />', + 'cite_error_references_invalid_parameters' => 'תגית <references> שגויה; לא ניתן להשתמש בפרמטרים, יש להשתמש בקוד <references />', + 'cite_error_references_no_backlink_label' => "נגמרו תוויות הקישורים המותאמים אישית, אנא הגדירו נוספים בהודעת המערכת \"''cite_references_link_many_format_backlink_labels''\"", + 'cite_error_references_no_text' => 'לא נכתב טקסט.', ); -$wgCiteMessages['id'] = array( - # Internal errors - 'cite_croak' => 'Kegagalan pengutipan; $1: $2', - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Kesalahan internal; $str tak sah', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Kesalahan internal; kunci stack tak sah', - # User errors - 'cite_error' => 'Kesalahan pengutipan $1; $2', - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Kesalahan pemanggilan; diharapkan suatu kunci non-integer', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Kesalahan pemanggilan; tidak ada kunci yang dispesifikasikan', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Kesalahan pemanggilan; kunci tak sah, contohnya karena terlalu banyak atau tidak ada kunci yang dispesifikasikan', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Kesalahan pemanggilan; tidak ada masukan yang dispesifikasikan', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Kesalahan masukan; seharusnya tidak ada', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Paramater tak sah; seharusnya tidak ada', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "Kehabisan label pralana balik, tambakan pada pesan sistem \"''cite_references_link_many_format_backlink_labels''\"", +/** Indonesian (Bahasa Indonesia) */ +$messages['id'] = array( + 'cite_croak' => 'Kegagalan pengutipan; $1: $2', + 'cite_error_key_str_invalid' => 'Kesalahan internal; $str tak sah', + 'cite_error_stack_invalid_input' => 'Kesalahan internal; kunci stack tak sah', + 'cite_error' => 'Kesalahan pengutipan $1; $2', + 'cite_error_ref_numeric_key' => 'Kesalahan pemanggilan; diharapkan suatu kunci non-integer', + 'cite_error_ref_no_key' => 'Kesalahan pemanggilan; tidak ada kunci yang dispesifikasikan', + 'cite_error_ref_too_many_keys' => 'Kesalahan pemanggilan; kunci tak sah, contohnya karena terlalu banyak atau tidak ada kunci yang dispesifikasikan', + 'cite_error_ref_no_input' => 'Kesalahan pemanggilan; tidak ada masukan yang dispesifikasikan', + 'cite_error_references_invalid_input' => 'Kesalahan masukan; seharusnya tidak ada', + 'cite_error_references_invalid_parameters' => 'Paramater tak sah; seharusnya tidak ada', + 'cite_error_references_no_backlink_label' => "Kehabisan label pralana balik, tambakan pada pesan sistem \"''cite_references_link_many_format_backlink_labels''\"", ); -$wgCiteMessages['it'] = array( - # Internal errors - 'cite_croak' => 'Errore nella citazione: $1: $2', - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Errore interno: $str errato', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Errore interno: chiave di stack errata', +/** Italian (Italiano) */ +$messages['it'] = array( + 'cite_croak' => 'Errore nella citazione: $1: $2', + 'cite_error_key_str_invalid' => 'Errore interno: $str errato', + 'cite_error_stack_invalid_input' => 'Errore interno: chiave di stack errata', + 'cite_error' => 'Errore nella funzione Cite $1: $2', + 'cite_error_ref_numeric_key' => "Errore nell'uso del marcatore <ref>: il nome non può essere un numero intero. Usare un titolo esteso", + 'cite_error_ref_no_key' => "Errore nell'uso del marcatore <ref>: i ref vuoti non possono essere privi di nome", + 'cite_error_ref_too_many_keys' => "Errore nell'uso del marcatore <ref>: nomi non validi (ad es. numero troppo elevato)", + 'cite_error_ref_no_input' => "Errore nell'uso del marcatore <ref>: i ref privi di nome non possono essere vuoti", + 'cite_error_references_invalid_input' => "Errore nell'uso del marcatoree <references>: input non ammesso, usare il marcatore +<references />", + 'cite_error_references_invalid_parameters' => "Errore nell'uso del marcatore <references>: parametri non ammessi, usare il marcatore <references />", + 'cite_error_references_no_backlink_label' => "Etichette di rimando personalizzate esaurite, aumentarne il numero nel messaggio \"''cite_references_link_many_format_backlink_labels''\"", +); - # User errors - 'cite_error' => 'Errore nella funzione Cite $1: $2', - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Errore nell\'uso del marcatore <ref>: il nome non può essere un numero intero. Usare un titolo esteso', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Errore nell\'uso del marcatore <ref>: i ref vuoti non possono essere privi di nome', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Errore nell\'uso del marcatore <ref>: nomi non validi (ad es. numero troppo elevato)', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Errore nell\'uso del marcatore <ref>: i ref privi di nome non possono essere vuoti', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Errore nell\'uso del marcatoree <references>: input non ammesso, usare il marcatore +/** Japanese (日本語) */ +$messages['ja'] = array( + 'cite_croak' => '引用タグ機能の重大なエラー; $1: $2', + 'cite_error_key_str_invalid' => '内部エラー; 無効な $str', + 'cite_error_stack_invalid_input' => '内部エラー; 無効なスタックキー', + 'cite_error' => '引用エラー $1; $2', + 'cite_error_ref_numeric_key' => '無効な <ref> タグ: 名前に単純な数値は使用できません。', + 'cite_error_ref_no_key' => '無効な <ref> タグ: 引用句の内容がない場合には名前 (name 属性)が必要です', + 'cite_error_ref_too_many_keys' => '無効な <ref> タグ: 無効な名前(多すぎる、もしくは誤った指定)', + 'cite_error_ref_no_input' => '無効な <ref> タグ: 名前 (name 属性)がない場合には引用句の内容が必要です', + 'cite_error_references_invalid_input' => '無効な <references> タグ: 内容のあるタグは使用できません。 <references /> を用いてください。', + 'cite_error_references_invalid_parameters' => '無効な <references> タグ: 引数のあるタグは使用できません。 <references /> を用いてください。', + 'cite_error_references_no_backlink_label' => "バックリンクラベルが使用できる個数を超えました。\"''cite_references_link_many_format_backlink_labels''\" メッセージでの定義を増やしてください。", +); + +/** ‪Қазақша (Қазақстан)‬ (‪Қазақша (Қазақстан)‬) */ +$messages['kk-kz'] = array( + 'cite_croak' => 'Дәйексөз алу сәтсіз бітті; $1: $2 ', + 'cite_error_key_str_invalid' => 'Ішкі қате; жарамсыз $str ', + 'cite_error_stack_invalid_input' => 'Ішкі қате; жарамсыз стек кілті', + 'cite_error' => 'Дәйексөз алу $1 қатесі; $2', + 'cite_error_ref_numeric_key' => 'Жарамсыз <ref> белгішесі; атау кәдімгі бүтін сан болуы мүмкін емес, сиппатауыш атау қолданыңыз', + 'cite_error_ref_no_key' => 'Жарамсыз <ref> белгішесі; мағлұматсыз түсініктемелерде атау болуы қажет', + 'cite_error_ref_too_many_keys' => 'Жарамсыз <ref> белгіше; жарамсыз атаулар, мысалы, тым көп', + 'cite_error_ref_no_input' => 'Жарамсыз <ref> белгіше; атаусыз түсініктемелерде мағлұматы болуы қажет', + 'cite_error_references_invalid_input' => 'Жарамсыз <references> белгіше; еш кіріс рұқсат етілмейді, былай <references /> қолданыңыз', + 'cite_error_references_invalid_parameters' => 'Жарамсыз <references> белгіше; еш баптар рұқсат етілмейді, былай <references /> қолданыңыз', + 'cite_error_references_no_backlink_label' => "Қосымша белгілердің саны бітті, одан әрі көбірек «''cite_references_link_many_format_backlink_labels''» жүйе хабарында белгілеңіз", +); + +/** ‪Qazaqşa (Türkïya)‬ (‪Qazaqşa (Türkïya)‬) */ +$messages['kk-tr'] = array( + 'cite_croak' => 'Däýeksöz alw sätsiz bitti; $1: $2 ', + 'cite_error_key_str_invalid' => 'İşki qate; jaramsız $str ', + 'cite_error_stack_invalid_input' => 'İşki qate; jaramsız stek kilti', + 'cite_error' => 'Däýeksöz alw $1 qatesi; $2', + 'cite_error_ref_numeric_key' => 'Jaramsız <ref> belgişesi; ataw kädimgi bütin san bolwı mümkin emes, sïppatawış ataw qoldanıñız', + 'cite_error_ref_no_key' => 'Jaramsız <ref> belgişesi; mağlumatsız tüsiniktemelerde ataw bolwı qajet', + 'cite_error_ref_too_many_keys' => 'Jaramsız <ref> belgişe; jaramsız atawlar, mısalı, tım köp', + 'cite_error_ref_no_input' => 'Jaramsız <ref> belgişe; atawsız tüsiniktemelerde mağlumatı bolwı qajet', + 'cite_error_references_invalid_input' => 'Jaramsız <references> belgişe; eş kiris ruqsat etilmeýdi, bılaý <references /> qoldanıñız', + 'cite_error_references_invalid_parameters' => 'Jaramsız <references> belgişe; eş baptar ruqsat etilmeýdi, bılaý <references /> qoldanıñız', + 'cite_error_references_no_backlink_label' => "Qosımşa belgilerdiñ sanı bitti, odan äri köbirek «''cite_references_link_many_format_backlink_labels''» jüýe xabarında belgileñiz", +); + +/** ‫قازاقشا (جۇنگو)‬ (‫قازاقشا (جۇنگو)‬) */ +$messages['kk-cn'] = array( + 'cite_croak' => 'دٵيەكسٶز الۋ سٵتسٸز بٸتتٸ; $1: $2 ', + 'cite_error_key_str_invalid' => 'ٸشكٸ قاتە; جارامسىز $str ', + 'cite_error_stack_invalid_input' => 'ٸشكٸ قاتە; جارامسىز ستەك كٸلتٸ', + 'cite_error' => 'دٵيەكسٶز الۋ $1 قاتەسٸ; $2', + 'cite_error_ref_numeric_key' => 'جارامسىز <ref> بەلگٸشەسٸ; اتاۋ كٵدٸمگٸ بٷتٸن سان بولۋى مٷمكٸن ەمەس, سيپپاتاۋىش اتاۋ قولدانىڭىز', + 'cite_error_ref_no_key' => 'جارامسىز <ref> بەلگٸشەسٸ; ماعلۇماتسىز تٷسٸنٸكتەمەلەردە اتاۋ بولۋى قاجەت', + 'cite_error_ref_too_many_keys' => 'جارامسىز <ref> بەلگٸشە; جارامسىز اتاۋلار, مىسالى, تىم كٶپ', + 'cite_error_ref_no_input' => 'جارامسىز <ref> بەلگٸشە; اتاۋسىز تٷسٸنٸكتەمەلەردە ماعلۇماتى بولۋى قاجەت', + 'cite_error_references_invalid_input' => 'جارامسىز <references> بەلگٸشە; ەش كٸرٸس رۇقسات ەتٸلمەيدٸ, بىلاي <references /> قولدانىڭىز', + 'cite_error_references_invalid_parameters' => 'جارامسىز <references> بەلگٸشە; ەش باپتار رۇقسات ەتٸلمەيدٸ, بىلاي <references /> قولدانىڭىز', + 'cite_error_references_no_backlink_label' => "قوسىمشا بەلگٸلەردٸڭ سانى بٸتتٸ, ودان ٵرٸ كٶبٸرەك «''cite_references_link_many_format_backlink_labels''» جٷيە حابارىندا بەلگٸلەڭٸز", +); + +$messages['kk'] = $messages['kk-kz']; + +/** Lietuvių (Lietuvių) */ +$messages['lt'] = array( + 'cite_croak' => 'Cituoti nepavyko; $1: $2', + 'cite_error_key_str_invalid' => 'Vidinė klaida; neleistinas $str', + 'cite_error_stack_invalid_input' => 'Vidinė klaida; neleistinas steko raktas', + 'cite_error' => 'Citavimo klaida $1; $2', + 'cite_error_ref_numeric_key' => 'Neleistina <ref> gairė; vardas negali būti tiesiog skaičius, naudokite tekstinį pavadinimą', + 'cite_error_ref_no_key' => 'Neleistina <ref> gairė; nuorodos be turinio turi turėti vardą', + 'cite_error_ref_too_many_keys' => 'Neleistina <ref> gairė; neleistini vardai, pvz., per daug', + 'cite_error_ref_no_input' => 'Neleistina <ref> gairė; nuorodos be vardo turi turėti turinį', + 'cite_error_references_invalid_input' => 'Neleistina <references> gairė; neleistina jokia įvestis, naudokite <references />', + 'cite_error_references_invalid_parameters' => 'Neleistina <references> gairė; neleidžiami jokie parametrai, naudokite <references />', + 'cite_error_references_no_backlink_label' => "Baigėsi antraštės, nurodykite daugiau \"''cite_references_link_many_format_backlink_labels''\" sisteminiame tekste", +); + +/** Dutch (Nederlands) */ +$messages['nl'] = array( + 'cite_croak' => 'Probleem met Cite; $1: $2', + 'cite_error_key_str_invalid' => 'Interne fout; onjuiste $str', + 'cite_error_stack_invalid_input' => 'Interne fout; onjuiste stacksleutel', + 'cite_error' => 'Citefout $1; $2', + 'cite_error_ref_numeric_key' => 'Onjuiste tag <ref>; de naam kan geen simplele integer zijn, gebruik een beschrijvende titel', + 'cite_error_ref_no_key' => 'Onjuiste tag <ref>; refs zonder inhoud moeten een naam hebben', + 'cite_error_ref_too_many_keys' => 'Onjuiste tag <ref>; onjuiste namen, bijvoorbeeld te veel', + 'cite_error_ref_no_input' => 'Onjuiste tag <ref>; refs zonder naam moeten inhoud hebben', + 'cite_error_references_invalid_input' => 'Onjuiste tag <references>; invoer is niet toegestaan, gebruik <references />', + 'cite_error_references_invalid_parameters' => 'Onjuiste tag <references>; parameters zijn niet toegestaan, gebruik <references />', +); + +/** Portuguese (Português) */ +$messages['pt'] = array( + 'cite_croak' => 'Citação com problemas; $1: $2', + 'cite_error_key_str_invalid' => 'Erro interno; $str inválido', + 'cite_error_stack_invalid_input' => 'Erro interno; chave fixa inválida', + 'cite_error' => 'Erro de citação $1; $2', + 'cite_error_ref_numeric_key' => 'Código <ref> inválido; o nome não pode ser um número. Utilize um nome descritivo', + 'cite_error_ref_no_key' => 'Código <ref> inválido; refs sem conteúdo devem ter um parâmetro de nome', + 'cite_error_ref_too_many_keys' => 'Código <ref> inválido; nomes inválidos (por exemplo, nome muito extenso)', + 'cite_error_ref_no_input' => 'Código <ref> inválido; refs sem parâmetro de nome devem possuir conteúdo a elas associado', + 'cite_error_references_invalid_input' => 'Código <references> inválido; no input is allowed, use <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Errore nell\'uso del marcatore <references>: parametri non ammessi, usare il marcatore <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "Etichette di rimando personalizzate esaurite, aumentarne il numero nel messaggio \"''cite_references_link_many_format_backlink_labels''\"", - + 'cite_error_references_invalid_parameters' => 'Código <references> inválido; não são permitidos parâmetros. Utilize como <references />', ); -$wgCiteMessages['ja'] = array( - - # Internal errors - 'cite_croak' => '引用タグ機能の重大なエラー; $1: $2', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => '内部エラー; 無効な $str', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => '内部エラー; 無効なスタックキー', - - # User errors - 'cite_error' => '引用エラー $1; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => '無効な <ref> タグ: 名前に単純な数値は使用できません。', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => '無効な <ref> タグ: 引用句の内容がない場合には名前 (name 属性)が必要です', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => '無効な <ref> タグ: 無効な名前(多すぎる、もしくは誤った指定)', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => '無効な <ref> タグ: 名前 (name 属性)がない場合には引用句の内容が必要です', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => '無効な <references> タグ: 内容のあるタグは使用できません。 <references /> を用いてください。', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => '無効な <references> タグ: 引数のあるタグは使用できません。 <references /> を用いてください。', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "バックリンクラベルが使用できる個数を超えました。\"''cite_references_link_many_format_backlink_labels''\" メッセージでの定義を増やしてください。", -); - -$wgCiteMessages['kk-kz'] = array( - /* - Debug and errors - */ - - # Internal errors - 'cite_croak' => 'Дәйексөз алу сәтсіз бітті; $1: $2 ', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Ішкі қате; жарамсыз $str ', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Ішкі қате; жарамсыз стек кілті', - - # User errors - 'cite_error' => 'Дәйексөз алу $1 қатесі; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Жарамсыз <ref> белгішесі; атау кәдімгі бүтін сан болуы мүмкін емес, сиппатауыш атау қолданыңыз', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Жарамсыз <ref> белгішесі; мағлұматсыз түсініктемелерде атау болуы қажет', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Жарамсыз <ref> белгіше; жарамсыз атаулар, мысалы, тым көп', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Жарамсыз <ref> белгіше; атаусыз түсініктемелерде мағлұматы болуы қажет', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Жарамсыз <references> белгіше; еш кіріс рұқсат етілмейді, былай <references /> қолданыңыз', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Жарамсыз <references> белгіше; еш баптар рұқсат етілмейді, былай <references /> қолданыңыз', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => 'Қосымша белгілердің саны бітті, одан әрі көбірек «\'\'cite_references_link_many_format_backlink_labels\'\'» жүйе хабарында белгілеңіз', -); -$wgCiteMessages['kk-tr'] = array( - /* - Debug and errors - */ - - # Internal errors - 'cite_croak' => 'Däýeksöz alw sätsiz bitti; $1: $2 ', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'İşki qate; jaramsız $str ', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'İşki qate; jaramsız stek kilti', - - # User errors - 'cite_error' => 'Däýeksöz alw $1 qatesi; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Jaramsız <ref> belgişesi; ataw kädimgi bütin san bolwı mümkin emes, sïppatawış ataw qoldanıñız', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Jaramsız <ref> belgişesi; mağlumatsız tüsiniktemelerde ataw bolwı qajet', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Jaramsız <ref> belgişe; jaramsız atawlar, mısalı, tım köp', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Jaramsız <ref> belgişe; atawsız tüsiniktemelerde mağlumatı bolwı qajet', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Jaramsız <references> belgişe; eş kiris ruqsat etilmeýdi, bılaý <references /> qoldanıñız', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Jaramsız <references> belgişe; eş baptar ruqsat etilmeýdi, bılaý <references /> qoldanıñız', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => 'Qosımşa belgilerdiñ sanı bitti, odan äri köbirek «\'\'cite_references_link_many_format_backlink_labels\'\'» jüýe xabarında belgileñiz', -); -$wgCiteMessages['kk-cn'] = array( - /* - Debug and errors - */ - - # Internal errors - 'cite_croak' => 'دٵيەكسٶز الۋ سٵتسٸز بٸتتٸ; $1: $2 ', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'ٸشكٸ قاتە; جارامسىز $str ', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'ٸشكٸ قاتە; جارامسىز ستەك كٸلتٸ', - - # User errors - 'cite_error' => 'دٵيەكسٶز الۋ $1 قاتەسٸ; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'جارامسىز <ref> بەلگٸشەسٸ; اتاۋ كٵدٸمگٸ بٷتٸن سان بولۋى مٷمكٸن ەمەس, سيپپاتاۋىش اتاۋ قولدانىڭىز', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'جارامسىز <ref> بەلگٸشەسٸ; ماعلۇماتسىز تٷسٸنٸكتەمەلەردە اتاۋ بولۋى قاجەت', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'جارامسىز <ref> بەلگٸشە; جارامسىز اتاۋلار, مىسالى, تىم كٶپ', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'جارامسىز <ref> بەلگٸشە; اتاۋسىز تٷسٸنٸكتەمەلەردە ماعلۇماتى بولۋى قاجەت', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'جارامسىز <references> بەلگٸشە; ەش كٸرٸس رۇقسات ەتٸلمەيدٸ, بىلاي <references /> قولدانىڭىز', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'جارامسىز <references> بەلگٸشە; ەش باپتار رۇقسات ەتٸلمەيدٸ, بىلاي <references /> قولدانىڭىز', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => 'قوسىمشا بەلگٸلەردٸڭ سانى بٸتتٸ, ودان ٵرٸ كٶبٸرەك «\'\'cite_references_link_many_format_backlink_labels\'\'» جٷيە حابارىندا بەلگٸلەڭٸز', -); -$wgCiteMessages['kk'] = $wgCiteMessages['kk-kz']; -$wgCiteMessages['lt'] = array( - # Internal errors - 'cite_croak' => 'Cituoti nepavyko; $1: $2', - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Vidinė klaida; neleistinas $str', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Vidinė klaida; neleistinas steko raktas', - - # User errors - 'cite_error' => 'Citavimo klaida $1; $2', - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Neleistina <ref> gairė; vardas negali būti tiesiog skaičius, naudokite tekstinį pavadinimą', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Neleistina <ref> gairė; nuorodos be turinio turi turėti vardą', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Neleistina <ref> gairė; neleistini vardai, pvz., per daug', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Neleistina <ref> gairė; nuorodos be vardo turi turėti turinį', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Neleistina <references> gairė; neleistina jokia įvestis, naudokite <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Neleistina <references> gairė; neleidžiami jokie parametrai, naudokite <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "Baigėsi antraštės, nurodykite daugiau \"''cite_references_link_many_format_backlink_labels''\" sisteminiame tekste", -); -$wgCiteMessages['nl'] = array( - /* - Debug and errors - */ - - # Internal errors - 'cite_croak' => 'Probleem met Cite; $1: $2', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Interne fout; onjuiste $str', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Interne fout; onjuiste stacksleutel', - - # User errors - 'cite_error' => 'Citefout $1; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Onjuiste tag <ref>; de naam kan geen simplele integer zijn, gebruik een beschrijvende titel', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Onjuiste tag <ref>; refs zonder inhoud moeten een naam hebben', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Onjuiste tag <ref>; onjuiste namen, bijvoorbeeld te veel', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Onjuiste tag <ref>; refs zonder naam moeten inhoud hebben', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Onjuiste tag <references>; invoer is niet toegestaan, gebruik <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Onjuiste tag <references>; parameters zijn niet toegestaan, gebruik <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "Ran out of custom backlink labels, define more in the \"''cite_references_link_many_format_backlink_labels''\" message", -); -$wgCiteMessages['pt'] = array( - /* - Debug and errors - */ - - # Internal errors - 'cite_croak' => 'Citação com problemas; $1: $2', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Erro interno; $str inválido', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Erro interno; chave fixa inválida', - - # User errors - 'cite_error' => 'Erro de citação $1; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Código <ref> inválido; o nome não pode ser um número. Utilize um nome descritivo', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Código <ref> inválido; refs sem conteúdo devem ter um parâmetro de nome', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Código <ref> inválido; nomes inválidos (por exemplo, nome muito extenso)', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Código <ref> inválido; refs sem parâmetro de nome devem possuir conteúdo a elas associado', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Código <references> inválido; no input is allowed, use -<references />', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Código <references> inválido; não são permitidos parâmetros. Utilize como <references />', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "Ran out of custom backlink labels, define more in the \"''cite_references_link_many_format_backlink_labels''\" message", -); -$wgCiteMessages['ru'] = array( - /* - Debug and errors - */ - - # Internal errors - 'cite_croak' => 'Цитата сдохла; $1: $2', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Внутренняя ошибка: неверный $str', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Внутренняя ошибка: неверный ключ стека ', - - # User errors - 'cite_error' => 'Ошибка цитирования $1; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Неправильный вызов: ожидался нечисловой ключ', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Неправильный вызов: ключ не был указан', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Неправильный вызов: неверные ключи, например было указано слишком много ключей или ключ был неправильным', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Неверный вызов: нет входных данных', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Входные данные недействительны, так как не предполагаются', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Переданы недействительные параметры; их вообще не предусмотрено.', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => 'Не хватает символов для возвратных гиперссылок; следует расширить системную переменную «cite_references_link_many_format_backlink_labels».', - - /* - Output formatting - */ +/** Russian (Русский) */ +$messages['ru'] = array( + 'cite_croak' => 'Цитата сдохла; $1: $2', + 'cite_error_key_str_invalid' => 'Внутренняя ошибка: неверный $str', + 'cite_error_stack_invalid_input' => 'Внутренняя ошибка: неверный ключ стека ', + 'cite_error' => 'Ошибка цитирования $1; $2', + 'cite_error_ref_numeric_key' => 'Неправильный вызов: ожидался нечисловой ключ', + 'cite_error_ref_no_key' => 'Неправильный вызов: ключ не был указан', + 'cite_error_ref_too_many_keys' => 'Неправильный вызов: неверные ключи, например было указано слишком много ключей или ключ был неправильным', + 'cite_error_ref_no_input' => 'Неверный вызов: нет входных данных', + 'cite_error_references_invalid_input' => 'Входные данные недействительны, так как не предполагаются', + 'cite_error_references_invalid_parameters' => 'Переданы недействительные параметры; их вообще не предусмотрено.', + 'cite_error_references_no_backlink_label' => 'Не хватает символов для возвратных гиперссылок; следует расширить системную переменную «cite_references_link_many_format_backlink_labels».', 'cite_references_link_many_format_backlink_labels' => 'а б в г д е ё ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я', ); -$wgCiteMessages['sk'] = array( - /* - Debug and errors - */ - # Internal errors - 'cite_croak' => 'Citát je už neaktuálny; $1: $2', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => 'Vnútorná chyba; neplatný $str', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => 'Vnútorná chyba; neplatný kľúč zásobníka', - - # User errors - 'cite_error' => 'Chyba citácie $1; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => 'Neplatné volanie; očakáva sa neceločíselný typ kľúča', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => 'Neplatné volanie; nebol špecifikovaný kľúč', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => 'Neplatné volanie; neplatné kľúče, napr. príliš veľa alebo nesprávne špecifikovaný kľúč', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => 'Neplatné volanie; nebol špecifikovaný vstup', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => 'Neplatné volanie; neočakával sa vstup', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Neplatné parametre; neočakávli sa žiadne', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "Minuli sa generované návestia spätných odkazov, definujte viac v správe \"''cite_references_link_many_format_backlink_labels''\"", +/** Slovak (Slovenčina) */ +$messages['sk'] = array( + 'cite_croak' => 'Citát je už neaktuálny; $1: $2', + 'cite_error_key_str_invalid' => 'Vnútorná chyba; neplatný $str', + 'cite_error_stack_invalid_input' => 'Vnútorná chyba; neplatný kľúč zásobníka', + 'cite_error' => 'Chyba citácie $1; $2', + 'cite_error_ref_numeric_key' => 'Neplatné volanie; očakáva sa neceločíselný typ kľúča', + 'cite_error_ref_no_key' => 'Neplatné volanie; nebol špecifikovaný kľúč', + 'cite_error_ref_too_many_keys' => 'Neplatné volanie; neplatné kľúče, napr. príliš veľa alebo nesprávne špecifikovaný kľúč', + 'cite_error_ref_no_input' => 'Neplatné volanie; nebol špecifikovaný vstup', + 'cite_error_references_invalid_input' => 'Neplatné volanie; neočakával sa vstup', + 'cite_error_references_invalid_parameters' => 'Neplatné parametre; neočakávli sa žiadne', + 'cite_error_references_no_backlink_label' => "Minuli sa generované návestia spätných odkazov, definujte viac v správe \"''cite_references_link_many_format_backlink_labels''\"", ); -$wgCiteMessages['yue'] = array( - /* - Debug and errors - */ - # Internal errors - 'cite_croak' => '引用阻塞咗; $1: $2', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => '內部錯誤; 無效嘅 $str', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => '內部錯誤; 無效嘅堆疊匙', - - # User errors - 'cite_error' => '引用錯誤 $1; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => '無效嘅呼叫; 需要一個非整數嘅匙', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => '無效嘅呼叫; 未指定匙', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => '無效嘅呼叫; 無效嘅匙, 例如: 太多或者指定咗一個錯咗嘅匙', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => '無效嘅呼叫; 未指定輸入', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => '無效嘅輸入; 唔需要有嘢', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => '無效嘅參數; 唔需要有嘢', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "用晒啲自定返回標籤, 響 \"''cite_references_link_many_format_backlink_labels''\" 信息再整多啲", +/** Kantonese (粵語) */ +$messages['yue'] = array( + 'cite_croak' => '引用阻塞咗; $1: $2', + 'cite_error_key_str_invalid' => '內部錯誤; 無效嘅 $str', + 'cite_error_stack_invalid_input' => '內部錯誤; 無效嘅堆疊匙', + 'cite_error' => '引用錯誤 $1; $2', + 'cite_error_ref_numeric_key' => '無效嘅呼叫; 需要一個非整數嘅匙', + 'cite_error_ref_no_key' => '無效嘅呼叫; 未指定匙', + 'cite_error_ref_too_many_keys' => '無效嘅呼叫; 無效嘅匙, 例如: 太多或者指定咗一個錯咗嘅匙', + 'cite_error_ref_no_input' => '無效嘅呼叫; 未指定輸入', + 'cite_error_references_invalid_input' => '無效嘅輸入; 唔需要有嘢', + 'cite_error_references_invalid_parameters' => '無效嘅參數; 唔需要有嘢', + 'cite_error_references_no_backlink_label' => "用晒啲自定返回標籤, 響 \"''cite_references_link_many_format_backlink_labels''\" 信息再整多啲", ); -$wgCiteMessages['zh-hans'] = array( - /* - Debug and errors - */ - # Internal errors - 'cite_croak' => '引用阻塞; $1: $2', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => '内部错误;非法的 $str', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => '内部错误;非法堆栈键值', - - # User errors - 'cite_error' => '引用错误 $1; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => '无效呼叫;需要一个非整数的键值', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => '无效呼叫;没有指定键值', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => '无效呼叫;非法键值,例如:过多或错误的指定键值', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => '无效呼叫;没有指定的输入', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => '无效输入;需求为空', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => '非法参数;需求为空', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "自定义后退标签已经用完了,现在可在标签 \"''cite_references_link_many_format_backlink_labels''\" 定义更多信息", +/** Simplified Chinese (‪中文(简体)‬) */ +$messages['zh-hans'] = array( + 'cite_croak' => '引用阻塞; $1: $2', + 'cite_error_key_str_invalid' => '内部错误;非法的 $str', + 'cite_error_stack_invalid_input' => '内部错误;非法堆栈键值', + 'cite_error' => '引用错误 $1; $2', + 'cite_error_ref_numeric_key' => '无效呼叫;需要一个非整数的键值', + 'cite_error_ref_no_key' => '无效呼叫;没有指定键值', + 'cite_error_ref_too_many_keys' => '无效呼叫;非法键值,例如:过多或错误的指定键值', + 'cite_error_ref_no_input' => '无效呼叫;没有指定的输入', + 'cite_error_references_invalid_input' => '无效输入;需求为空', + 'cite_error_references_invalid_parameters' => '非法参数;需求为空', + 'cite_error_references_no_backlink_label' => "自定义后退标签已经用完了,现在可在标签 \"''cite_references_link_many_format_backlink_labels''\" 定义更多信息", ); -$wgCiteMessages['zh-hant'] = array( - /* - Debug and errors - */ - # Internal errors - 'cite_croak' => '引用阻塞; $1: $2', - - 'cite_error_' . CITE_ERROR_KEY_STR_INVALID => '內部錯誤;非法的 $str', - 'cite_error_' . CITE_ERROR_STACK_INVALID_INPUT => '內部錯誤;非法堆疊鍵值', - - # User errors - 'cite_error' => '引用錯誤 $1; $2', - - 'cite_error_' . CITE_ERROR_REF_NUMERIC_KEY => '無效呼叫;需要一個非整數的鍵', - 'cite_error_' . CITE_ERROR_REF_NO_KEY => '無效呼叫;沒有指定鍵', - 'cite_error_' . CITE_ERROR_REF_TOO_MANY_KEYS => '無效呼叫;非法鍵值,例如:過多或錯誤的指定鍵', - 'cite_error_' . CITE_ERROR_REF_NO_INPUT => '無效呼叫;沒有指定的輸入', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_INPUT => '無效輸入;需求為空', - 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => '非法參數;需求為空', - 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "自訂後退標籤已經用完了,現在可在標籤 \"''cite_references_link_many_format_backlink_labels''\" 定義更多信息", +/** ‪Traditional Chinese (‪中文(繁體)‬) */ +$messages['zh-hant'] = array( + 'cite_croak' => '引用阻塞; $1: $2', + 'cite_error_key_str_invalid' => '內部錯誤;非法的 $str', + 'cite_error_stack_invalid_input' => '內部錯誤;非法堆疊鍵值', + 'cite_error' => '引用錯誤 $1; $2', + 'cite_error_ref_numeric_key' => '無效呼叫;需要一個非整數的鍵', + 'cite_error_ref_no_key' => '無效呼叫;沒有指定鍵', + 'cite_error_ref_too_many_keys' => '無效呼叫;非法鍵值,例如:過多或錯誤的指定鍵', + 'cite_error_ref_no_input' => '無效呼叫;沒有指定的輸入', + 'cite_error_references_invalid_input' => '無效輸入;需求為空', + 'cite_error_references_invalid_parameters' => '非法參數;需求為空', + 'cite_error_references_no_backlink_label' => "自訂後退標籤已經用完了,現在可在標籤 \"''cite_references_link_many_format_backlink_labels''\" 定義更多信息", ); -$wgCiteMessages['zh'] = $wgCiteMessages['zh-hans']; -$wgCiteMessages['zh-cn'] = $wgCiteMessages['zh-hans']; -$wgCiteMessages['zh-hk'] = $wgCiteMessages['zh-hant']; -$wgCiteMessages['zh-sg'] = $wgCiteMessages['zh-hans']; -$wgCiteMessages['zh-tw'] = $wgCiteMessages['zh-hant']; -$wgCiteMessages['zh-yue'] = $wgCiteMessages['yue']; + +$messages['zh'] = $messages['zh-hans']; +$messages['zh-cn'] = $messages['zh-hans']; +$messages['zh-hk'] = $messages['zh-hant']; +$messages['zh-sg'] = $messages['zh-hans']; +$messages['zh-tw'] = $messages['zh-hant']; +$messages['zh-yue'] = $messages['yue']; diff --git a/Cite.php b/Cite.php index 9bfbe7e8..f1bbd16f 100644 --- a/Cite.php +++ b/Cite.php @@ -26,44 +26,11 @@ $wgExtensionCredits['parserhook'][] = array( 'url' => 'http://www.mediawiki.org/wiki/Extension:Cite/Cite.php' ); $wgParserTestFiles[] = dirname( __FILE__ ) . "/citeParserTests.txt"; - -/** - * Error codes, first array = internal errors; second array = user errors - */ -$wgCiteErrors = array( - 'system' => array( - 'CITE_ERROR_KEY_STR_INVALID', - 'CITE_ERROR_STACK_INVALID_INPUT' - ), - 'user' => array( - 'CITE_ERROR_REF_NUMERIC_KEY', - 'CITE_ERROR_REF_NO_KEY', - 'CITE_ERROR_REF_TOO_MANY_KEYS', - 'CITE_ERROR_REF_NO_INPUT', - 'CITE_ERROR_REFERENCES_INVALID_INPUT', - 'CITE_ERROR_REFERENCES_INVALID_PARAMETERS', - 'CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL', - 'CITE_ERROR_REFERENCES_NO_TEXT' - ) -); - -for ( $i = 0; $i < count( $wgCiteErrors['system'] ); ++$i ) - // System errors are negative integers - define( $wgCiteErrors['system'][$i], -($i + 1) ); -for ( $i = 0; $i < count( $wgCiteErrors['user'] ); ++$i ) - // User errors are positive integers - define( $wgCiteErrors['user'][$i], $i + 1 ); - -# Internationalisation file -require_once( dirname(__FILE__) . '/Cite.i18n.php' ); +$wgExtensionMessagesFiles['Cite'] = dirname( __FILE__ ) . "/Cite.i18n.php"; function wfCite() { - # Add messages - global $wgMessageCache, $wgCiteMessages; - foreach( $wgCiteMessages as $key => $value ) { - $wgMessageCache->addMessages( $wgCiteMessages[$key], $key ); - } - + wfLoadExtensionMessages( 'Cite' ); + class Cite { /**#@+ * @access private @@ -179,17 +146,17 @@ function wfCite() { # . This construct is always invalid: either # it's a contentful ref, or it's a named duplicate and should # be . - return $this->error( CITE_ERROR_REF_NO_INPUT ); + return $this->error( 'cite_error_ref_no_input' ); } if( $key === false ) { # TODO: Comment this case; what does this condition mean? - return $this->error( CITE_ERROR_REF_TOO_MANY_KEYS ); + return $this->error( 'cite_error_ref_too_many_keys' ); } if( $str === null and $key === null ) { # Something like ; this makes no sense. - return $this->error( CITE_ERROR_REF_NO_KEY ); + return $this->error( 'cite_error_ref_no_key' ); } if( preg_match( '/[0-9]+/', $key ) ) { @@ -197,7 +164,7 @@ function wfCite() { # cing duplicate id's in the XHTML. The Right Thing To Do # would be to mangle them, but it's not really high-priority # (and would produce weird id's anyway). - return $this->error( CITE_ERROR_REF_NUMERIC_KEY ); + return $this->error( 'cite_error_ref_numeric_key' ); } if( is_string( $key ) or is_string( $str ) ) { @@ -211,7 +178,7 @@ function wfCite() { # Not clear how we could get here, but something is probably # wrong with the types. Let's fail fast. - $this->croak( CITE_ERROR_KEY_STR_INVALID, serialize( "$str; $key" ) ); + $this->croak( 'cite_error_key_str_invalid', serialize( "$str; $key" ) ); } /** @@ -224,7 +191,6 @@ function wfCite() { * input and null on no input */ function refArg( $argv ) { - $cnt = count( $argv ); if ( $cnt > 1 ) @@ -308,7 +274,7 @@ function wfCite() { $this->mRefs[$key]['number'] ); } else - $this->croak( CITE_ERROR_STACK_INVALID_INPUT, serialize( array( $key, $str ) ) ); + $this->croak( 'cite_error_stack_invalid_input', serialize( array( $key, $str ) ) ); } /** @@ -336,9 +302,9 @@ function wfCite() { function guardedReferences( $str, $argv, $parser ) { $this->mParser = $parser; if ( $str !== null ) - return $this->error( CITE_ERROR_REFERENCES_INVALID_INPUT ); + return $this->error( 'cite_error_references_invalid_input' ); else if ( count( $argv ) ) - return $this->error( CITE_ERROR_REFERENCES_INVALID_PARAMETERS ); + return $this->error( 'cite_error_references_invalid_parameters' ); else return $this->referencesFormat(); } @@ -387,7 +353,7 @@ function wfCite() { 'cite_references_link_one', $this->referencesKey( $key ), $this->refKey( $key, $val['count'] ), - $this->error(CITE_ERROR_REFERENCES_NO_TEXT) + $this->error( 'cite_error_references_no_text' ) ); // Standalone named reference, I want to format this like an // anonymous reference because displaying "1. 1.1 Ref text" is @@ -399,7 +365,7 @@ function wfCite() { 'cite_references_link_one', $this->referencesKey( $key ), $this->refKey( $key, $val['count'] ), - ( $val['text'] != '' ? $val['text'] : $this->error( CITE_ERROR_REFERENCES_NO_TEXT ) ) + ( $val['text'] != '' ? $val['text'] : $this->error( 'cite_error_references_no_text' ) ) ); // Named references with >1 occurrences else { @@ -420,7 +386,7 @@ function wfCite() { wfMsgForContentNoTrans( 'cite_references_link_many', $this->referencesKey( $key ), $list, - ( $val['text'] != '' ? $val['text'] : $this->error( CITE_ERROR_REFERENCES_NO_TEXT ) ) + ( $val['text'] != '' ? $val['text'] : $this->error( 'cite_error_references_no_text' ) ) ); } } @@ -464,7 +430,7 @@ function wfCite() { return $this->mBacklinkLabels[$offset]; } else { // Feed me! - return $this->error( CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL ); + return $this->error( 'cite_error_references_no_backlink_label' ); } } @@ -653,20 +619,16 @@ function wfCite() { /** * Return an error message based on an error ID * - * @param int $id ID for the error + * @param string $key Message name for the error * @return string XHTML ready for output */ - function error( $id ) { - if ( $id > 0 ) - // User errors are positive - return - $this->parse( - '' . - wfMsg( 'cite_error', $id, wfMsg( "cite_error_$id" ) ) . - '' - ); - else if ( $id < 0 ) - return wfMsg( 'cite_error', $id ); + function error( $key ) { + return + $this->parse( + '' . + wfMsg( 'cite_error', wfMsg( $key ) ) . + '' + ); } /** @@ -688,3 +650,4 @@ function wfCite() { /**#@-*/ + diff --git a/citeParserTests.txt b/citeParserTests.txt index 82e16fc6..01260c20 100644 --- a/citeParserTests.txt +++ b/citeParserTests.txt @@ -207,18 +207,19 @@ Erroneous refs !! result -

Cite error 1; Invalid <ref> tag; name cannot be a simple integer, use a descriptive title +

Cite error: Invalid <ref> tag; name cannot be a simple integer, use a descriptive title

[1] -

Cite error 2; Invalid <ref> tag; refs with no content must have a name +

Cite error: Invalid <ref> tag; refs with no content must have a name

[2]

[3] -

Cite error 5; Invalid <references> tag; no input is allowed, use +

Cite error: Invalid <references> tag; no input is allowed, use <references /> -

Cite error 6; Invalid <references> tag; no parameters are allowed, use <references /> +

Cite error: Invalid <references> tag; no parameters are allowed, use <references />

  1. Also zero, but differently! (Normal ref)
  2. -
  3. Cite error 8; No text given.
  4. -
  5. Cite error 8; No text given.
+
  • Cite error: No text given.
  • +
  • Cite error: No text given.
  • !! end +