From e677f31c808c81cf9e42c660471d2c7d31908c06 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 9 Apr 2010 08:45:31 +0200 Subject: [PATCH] Add full example node translation script with output to create-weblinks. --- scripts/build/create-weblinks-itexi.py | 75 +++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 6 deletions(-) diff --git a/scripts/build/create-weblinks-itexi.py b/scripts/build/create-weblinks-itexi.py index 48a6f4ff90..d30dc35e82 100644 --- a/scripts/build/create-weblinks-itexi.py +++ b/scripts/build/create-weblinks-itexi.py @@ -17,10 +17,20 @@ depth = "../" # don't add your language to this list unless you have all the # items. +# Hmm, is this a feature -- why not keep original english as a fallback? langs = ['', 'es', 'nl'] -# FIXME: `grep -nH -B1 translationof Documentation//web/*' -# gives us the correct node names. +# Get/update node translations +''' +for i in es fr nl de hu ja it; do + echo "'"$i"': {" + (echo '--' ; grep -nH -B1 translationof Documentation/$i/web/*) \ + | pytt '^--\n.*@(?:unnum|sub)[^ ]* (.*)\n.*@translationof (.*)\n' "'\2': '\1',\n" \ + | grep -E 'Source|Learning|Glossary|Essay|Notation|Usage|Snippets|Web|Changes|Extending|Internals|Contributor' + echo "}," +done +''' + translations = { 'es': { 'Source': 'Código fuente', @@ -50,9 +60,19 @@ translations = { ' (did not exist in 2.12)': ' (no existía en la versión 2.12)', }, 'fr': { - 'Learning': 'Apprener?', - 'Music glossary': 'Lizes ici pour les motes?', - }, + 'Source': 'Sources', + 'Learning': 'Initiation', + 'Music glossary': 'Glossaire', + 'Essay': 'Essai', + 'Notation': 'Notation', + 'Usage': 'Utilisation', + 'Snippets': 'Morceaux choisis', + 'Web': 'Web', + 'Changes': 'Nouveautés', + 'Internals': 'Propriétés internes', + + #TODO + }, 'nl': { 'Source': 'Broncode', @@ -80,7 +100,50 @@ translations = { 'Doc tarball for ': 'Tarball met documentation voor ', ' (did not exist in 2.12)': ' (bestond nog niet in 2.12)', }, -} + 'de': { + 'Source': 'Quellen', + 'Learning': 'Einführung', + 'Music glossary': 'Glossar', + 'Essay': 'Aufsatz', + 'Notation': 'Notation', + 'Usage': 'Benutzung', + 'Snippets': 'Schnipsel', + 'Web': 'Web', + 'Changes': 'Änderungen', + 'Internals': 'Interna', + + #TODO + }, + 'hu': { + 'Source': 'Forrás', + 'Learning': 'Tankönyv', + 'Music glossary': 'Fogalomtár', + 'Essay': 'Esszé', + 'Notation': 'Kottaírás', + 'Usage': 'Használat', + 'Snippets': 'Kódrészletek', + 'Web': 'Web', + 'Changes': 'Változások', + 'Internals': 'Belső működés', + + #TODO + }, + 'ja': { + 'Source': 'ソース', + 'Learning': '学習', + 'Music glossary': '用語集', + 'Essay': 'エッセー', + 'Notation': '記譜法', + 'Usage': '使用方法', + 'Snippets': 'コード断片集', + 'Web': 'Web', + 'Changes': '変更点', + 'Internals': '内部リファレンス', + + #TODO + }, + } + -- 2.39.5