diff options
author | Albert <albert.tests@gmail.com> | 2013-10-20 12:14:07 (GMT) |
---|---|---|
committer | Albert <albert.tests@gmail.com> | 2013-10-20 12:14:07 (GMT) |
commit | 0be7e28b0cf1d972199574c5dc7c5937d237fbbd (patch) | |
tree | e8f9ac94b1da994c60aa20a825f8a6271bd0d8c0 /src | |
parent | 1a0a120b75c28b515cacb021d48d78c18a18b19b (diff) | |
download | Doxygen-0be7e28b0cf1d972199574c5dc7c5937d237fbbd.zip Doxygen-0be7e28b0cf1d972199574c5dc7c5937d237fbbd.tar.gz Doxygen-0be7e28b0cf1d972199574c5dc7c5937d237fbbd.tar.bz2 |
Patch regarding generating the rules file for the windows build regarding languages, some inconsistencies in the (windows) build system, corrections to some spelling.
- maintainers.txt
Spelling correction
- config.xml
Added missing languages
Extended some descriptions
- htmlhelp.cpp
Added missing languages
Spelling corrections
- language.cpp
Corrected call in respect to Serbian-Cyrillic
- translator_br.h
Spelling correction
- translator_fa.h
Corrected (not used) define in respect to LeftToRight
- translator_mk.h
Spelling correction
- translator_sc.h
Corrected in respect to consistency for Serbian-Cyrillic
- Doxygen.sln
Added project dependency as otherwise there might be a problem with the generation of version.cpp
- Doxygen.vcproj
Added rules for selecting languages to be used during translation
Corrected some incorrect references / directories
Corrected names of generated files / directories so they won't overwrite / conflict (especially during parallel builds)
Corrected name of genhead <-> gen_head (consistency with rules file)
- Doxywizard.vcproj
Corrected some incorrect references / directories
Corrected names of generated files / directories so they won't overwrite / conflict (especially during parallel builds)
Note place of resulting executable has hanged (more consistent now)
- Settings.rules
Corrected place where configure file can be found
- Version.rules
Corrected place where configure file can be found
- doxyindexer.vcproj
Corrected some incorrect references / directories
Corrected names of generated files / directories so they won't overwrite / conflict (especially during parallel builds)
- doxysearch.vcproj
Corrected some incorrect references / directories
Corrected names of generated files / directories so they won't overwrite / conflict (especially during parallel builds)
- iconv.vcproj
Corrected some incorrect references / directories
Corrected names of generated files / directories so they won't overwrite / conflict (especially during parallel builds)
- qtools.vcproj
Corrected some incorrect references / directories
Corrected names of generated files / directories so they won't overwrite / conflict (especially during parallel builds)
- lang_cfg.py
Script to generate the file lang_cfg.h based on the specified languages in the windows GUI or in the configure script.
- languages.py
Script to generate languages pane in the windows GUI
This file has to be called outside visual studio as it generates the rules for the Languages pane in the GUI (command on src directory python languages.py > ..\winbuild\Languages.rules)
- Languages.rules
Result file from language.py (old file was completely wrong and not used)
This file has to be generated outside visual studio as it contains the rules for the Languages pane in the GUI
- configure
Use lang_cfg.py script (consistency) instead of (internal) perl script.
Diffstat (limited to 'src')
-rw-r--r-- | src/config.xml | 16 | ||||
-rw-r--r-- | src/htmlhelp.cpp | 6 | ||||
-rw-r--r-- | src/lang_cfg.py | 8 | ||||
-rw-r--r-- | src/language.cpp | 4 | ||||
-rwxr-xr-x | src/languages.py | 106 | ||||
-rw-r--r-- | src/translator_br.h | 2 | ||||
-rw-r--r-- | src/translator_fa.h | 2 | ||||
-rw-r--r-- | src/translator_mk.h | 2 | ||||
-rw-r--r-- | src/translator_sc.h | 4 |
9 files changed, 136 insertions, 14 deletions
diff --git a/src/config.xml b/src/config.xml index 06654b9..e9c9add 100644 --- a/src/config.xml +++ b/src/config.xml @@ -289,6 +289,7 @@ Go to the <a href="commands.html">next</a> section or return to the </docs> <value name='Afrikaans'/> <value name='Arabic'/> + <value name='Armenian'/> <value name='Brazilian'/> <value name='Catalan'/> <value name='Chinese'/> @@ -297,28 +298,31 @@ Go to the <a href="commands.html">next</a> section or return to the <value name='Czech'/> <value name='Danish'/> <value name='Dutch'/> - <value name='English'/> + <value name='English' desc='(United States)'/> <value name='Esperanto'/> - <value name='Farsi'/> + <value name='Farsi' desc='(Persian)'/> <value name='Finnish'/> <value name='French'/> <value name='German'/> <value name='Greek'/> <value name='Hungarian'/> + <value name='Indonesian'/> <value name='Italian'/> <value name='Japanese'/> - <value name='Japanese-en'/> + <value name='Japanese-en' desc='(Japanese with English messages)'/> <value name='Korean'/> - <value name='Korean-en'/> + <value name='Korean-en' desc='(Korean with English messages)'/> <value name='Latvian'/> - <value name='Norwegian'/> + <value name='Lithuanian'/> <value name='Macedonian'/> - <value name='Persian'/> + <value name='Norwegian'/> + <value name='Persian' desc='(Farsi)'/> <value name='Polish'/> <value name='Portuguese'/> <value name='Romanian'/> <value name='Russian'/> <value name='Serbian'/> + <value name='Serbian-Cyrillic'/> <value name='Slovak'/> <value name='Slovene'/> <value name='Spanish'/> diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 6b1f98b..c4cca17 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -406,7 +406,7 @@ void HtmlHelp::initialize() s_languageDict.insert("norwegian", new QCString("0x814 Norwegian")); s_languageDict.insert("polish", new QCString("0x415 Polish")); s_languageDict.insert("portuguese", new QCString("0x816 Portuguese(Portugal)")); - s_languageDict.insert("brazil", new QCString("0x416 Portuguese(Brazil)")); + s_languageDict.insert("brazilian", new QCString("0x416 Portuguese(Brazil)")); s_languageDict.insert("russian", new QCString("0x419 Russian")); s_languageDict.insert("spanish", new QCString("0x40A Spanish(Traditional Sort)")); s_languageDict.insert("swedish", new QCString("0x41D Swedish")); @@ -433,6 +433,10 @@ void HtmlHelp::initialize() s_languageDict.insert("persian", new QCString("0x429 Persian (Iran)")); s_languageDict.insert("arabic", new QCString("0xC01 Arabic (Egypt)")); s_languageDict.insert("latvian", new QCString("0x426 Latvian")); + s_languageDict.insert("macedonian", new QCString("0x042f Macedonian (Former Yugoslav Republic of Macedonia)")); + s_languageDict.insert("armenian", new QCString("0x42b Armenian")); + s_languageDict.insert("esperanto", new QCString("0x48f Esperanto")); + s_languageDict.insert("serbian-cyrillic", new QCString("0xC1A Serbian (Serbia, Cyrillic)")); } diff --git a/src/lang_cfg.py b/src/lang_cfg.py new file mode 100644 index 0000000..9ba1319 --- /dev/null +++ b/src/lang_cfg.py @@ -0,0 +1,8 @@ +import sys + +if (len(sys.argv) > 0): + if (sys.argv[1] == "ENONLY"): + print "#define ENGLISH_ONLY" + else: + for x in xrange(1, len(sys.argv)): + print "#define LANG_%s"%(sys.argv[x]) diff --git a/src/language.cpp b/src/language.cpp index eb88455..c993323 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -354,9 +354,9 @@ bool setTranslator(const char *langName) } #endif #ifdef LANG_SC - else if (L_EQUAL("serbian-cyrilic")) + else if (L_EQUAL("serbian-cyrillic") || L_EQUAL("serbiancyr")) /* serbiancyr for consistency with older versions */ { - theTranslator=new TranslatorSerbian; + theTranslator=new TranslatorSerbianCyrillic; } #endif #ifdef LANG_CA diff --git a/src/languages.py b/src/languages.py new file mode 100755 index 0000000..0005e88 --- /dev/null +++ b/src/languages.py @@ -0,0 +1,106 @@ +# +# This file is an aid to generated the Languages rules file. +# usage: +# python languages.py > ..\winbuild\Languages.rules +# +import os +import re + +files = [f for f in os.listdir('.') if re.match(r'translator_[a-z][a-z]\.h', f)] +new_list = [] +for f in files: + new_list.append([f,(os.path.splitext(f)[0]).replace("translator_","").upper()]) + +# +# generating file is lang_cfg.py +# the rules file has to output lang_cfg.h +# +print """\ +<?xml version="1.0" encoding="utf-8"?> +<VisualStudioToolFile + Name="languages" + Version="8.00" + > + <Rules> + <CustomBuildRule + Name="Languages" + DisplayName="Settings" + CommandLine="python $(InputPath) [AllOptions] [AdditionalOptions] > $(InputDir)../src/$(InputName).h" + Outputs="$(InputDir)../src/$(InputName).h" + FileExtensions="*.py" + AdditionalDependencies="" + ExecutionDescription="Executing languages ..." + ShowOnlyRuleProperties="false" + > + <Properties> + <EnumProperty + Name="EnglishOnly" + DisplayName="Use English Only" + Description="Use English Only" + DefaultValue="0" + > + <Values> + <EnumValue + Value="0" + Switch="" + DisplayName="Don't use English Only" + /> + <EnumValue + Value="1" + Switch="ENONLY" + DisplayName="Use English Only" + /> + </Values> + </EnumProperty> +""" +# +# generate loop, English is mandatory (so cannot be chosen) +# +for f in new_list: + if (f[1] != "EN"): + # search for the language description + fil = open(f[0], 'r') + tmp = "" + for line in fil: + if "idLanguage" in line: + tmp = line + if "}" in line: + break + elif (tmp != ""): + tmp += line + if "}" in line: + break + + tmp = tmp.replace("\n","") + l = re.sub('[^"]*"([^"]*)".*','\\1',tmp) + l1 = l.replace("-","") + # capatalize first letter + l = l.title() + print """\ + <EnumProperty + Name="%s" + DisplayName="Use %s" + Description="Use %s" + DefaultValue="1" + > + <Values> + <EnumValue + Value="0" + Switch="" + DisplayName="Don't use %s" + /> + <EnumValue + Value="1" + Switch="%s" + DisplayName="Use %s" + /> + </Values> + </EnumProperty> + """ % (l1, l, l, l, f[1], l) + +print """\ + </Properties> + </CustomBuildRule> + </Rules> +</VisualStudioToolFile> +""" diff --git a/src/translator_br.h b/src/translator_br.h index b136f59..f9dba84 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -49,7 +49,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_8_0 */ virtual QCString idLanguage() { - return "brazil"; + return "brazilian"; } /*! Used to get the command(s) for the language support. This method diff --git a/src/translator_fa.h b/src/translator_fa.h index b9bbe14..bcc0572 100644 --- a/src/translator_fa.h +++ b/src/translator_fa.h @@ -35,7 +35,7 @@ #define TRANSLATOR_FA_H #define HtmlRightToLeft QCString("<div dir=\"rtl\">") -#define HtmlLeftToRight QCString("<div dir=\"rtl\">") +#define HtmlLeftToRight QCString("<div dir=\"ltr\">") #define HtmlDivEnd QCString("</div>") diff --git a/src/translator_mk.h b/src/translator_mk.h index 15da8e1..b753756 100644 --- a/src/translator_mk.h +++ b/src/translator_mk.h @@ -16,7 +16,7 @@ */ // Тranslated by Slave Jovanovski <slavejovanovski@yahoo.com> // -// The cyrilic strings were entered using Macedonian language support in +// The cyrillic strings were entered using Macedonian language support in // Windows. The editor used was Eclipse 3.2. The file was saved in UTF-8. // // Updates: diff --git a/src/translator_sc.h b/src/translator_sc.h index 37519d2..af2d7df 100644 --- a/src/translator_sc.h +++ b/src/translator_sc.h @@ -40,7 +40,7 @@ Translator class (by the local maintainer) when the localized translator is made up-to-date again. */ -class TranslatorSerbianCyrilic : public TranslatorAdapter_1_6_0 +class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0 { public: @@ -53,7 +53,7 @@ class TranslatorSerbianCyrilic : public TranslatorAdapter_1_6_0 * the identification used in language.cpp. */ virtual QCString idLanguage() - { return "serbiancyr"; } + { return "serbian-cyrillic"; } /*! Used to get the LaTeX command(s) for the language support. * This method should return string with commands that switch |