Commit dcf13520 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Merge pull request #12 from pepr/master

Almost all translators converted to UTF-8
parents d63fb848 4bc65b54
mailto.txt
\ No newline at end of file
...@@ -91,7 +91,7 @@ when the translator was updated. ...@@ -91,7 +91,7 @@ when the translator was updated.
<td>Chinese Traditional</td> <td>Chinese Traditional</td>
<td>Daniel YC Lin<br/>Gary Lee</td> <td>Daniel YC Lin<br/>Gary Lee</td>
<td>dlin dot tw at gmail dot com<br/>garywlee at gmail dot com</td> <td>dlin dot tw at gmail dot com<br/>garywlee at gmail dot com</td>
<td>1.8.0</td> <td>up-to-date</td>
</tr> </tr>
<tr bgcolor="#ffffff"> <tr bgcolor="#ffffff">
<td>Croatian</td> <td>Croatian</td>
...@@ -173,7 +173,7 @@ when the translator was updated. ...@@ -173,7 +173,7 @@ when the translator was updated.
</tr> </tr>
<tr bgcolor="#ffffff"> <tr bgcolor="#ffffff">
<td>Japanese</td> <td>Japanese</td>
<td>Hiroki Iseri<br/>Ryunosuke Satoh<br/>Kenji Nagamatsu<br/>Iwasa Kazmi</td> <td>Hiroki Iseri<br/>Ryūnosuke Satoh<br/>Kenji Nagamatsu<br/>Iwasa Kazmi</td>
<td>goyoki at gmail dot com<br/>sun594 at hotmail dot com<br/>naga at joyful dot club dot ne dot jp<br/><span style="color: brown">[unreachable]</span></td> <td>goyoki at gmail dot com<br/>sun594 at hotmail dot com<br/>naga at joyful dot club dot ne dot jp<br/><span style="color: brown">[unreachable]</span></td>
<td>1.6.0</td> <td>1.6.0</td>
</tr> </tr>
...@@ -335,7 +335,7 @@ when the translator was updated. ...@@ -335,7 +335,7 @@ when the translator was updated.
~ & Li Daobing & {\tt\tiny lidaobing at gmail dot com} & ~ \\ ~ & Li Daobing & {\tt\tiny lidaobing at gmail dot com} & ~ \\
~ & Wei Liu & {\tt\tiny liuwei at asiainfo dot com} & ~ \\ ~ & Wei Liu & {\tt\tiny liuwei at asiainfo dot com} & ~ \\
\hline \hline
Chinese Traditional & Daniel YC Lin & {\tt\tiny dlin dot tw at gmail dot com} & 1.8.0 \\ Chinese Traditional & Daniel YC Lin & {\tt\tiny dlin dot tw at gmail dot com} & up-to-date \\
~ & Gary Lee & {\tt\tiny garywlee at gmail dot com} & ~ \\ ~ & Gary Lee & {\tt\tiny garywlee at gmail dot com} & ~ \\
\hline \hline
Croatian & Boris Bralo & {\tt\tiny boris dot bralo at gmail dot com} & 1.8.2 \\ Croatian & Boris Bralo & {\tt\tiny boris dot bralo at gmail dot com} & 1.8.2 \\
...@@ -371,7 +371,7 @@ when the translator was updated. ...@@ -371,7 +371,7 @@ when the translator was updated.
~ & Ahmed Aldo Faisal & {\tt\tiny aaf23 at cam dot ac dot uk} & ~ \\ ~ & Ahmed Aldo Faisal & {\tt\tiny aaf23 at cam dot ac dot uk} & ~ \\
\hline \hline
Japanese & Hiroki Iseri & {\tt\tiny goyoki at gmail dot com} & 1.6.0 \\ Japanese & Hiroki Iseri & {\tt\tiny goyoki at gmail dot com} & 1.6.0 \\
~ & Ryunosuke Satoh & {\tt\tiny sun594 at hotmail dot com} & ~ \\ ~ & Ryūnosuke Satoh & {\tt\tiny sun594 at hotmail dot com} & ~ \\
~ & Kenji Nagamatsu & {\tt\tiny naga at joyful dot club dot ne dot jp} & ~ \\ ~ & Kenji Nagamatsu & {\tt\tiny naga at joyful dot club dot ne dot jp} & ~ \\
~ & Iwasa Kazmi & {\tt\tiny [unreachable] iwasa at cosmo-system dot jp} & ~ \\ ~ & Iwasa Kazmi & {\tt\tiny [unreachable] iwasa at cosmo-system dot jp} & ~ \\
\hline \hline
......
...@@ -86,7 +86,7 @@ Ahmed Aldo Faisal: aaf23 at cam dot ac dot uk ...@@ -86,7 +86,7 @@ Ahmed Aldo Faisal: aaf23 at cam dot ac dot uk
TranslatorJapanese TranslatorJapanese
Hiroki Iseri: goyoki at gmail dot com Hiroki Iseri: goyoki at gmail dot com
Ryunosuke Satoh: sun594 at hotmail dot com Ryūnosuke Satoh: sun594 at hotmail dot com
Kenji Nagamatsu: naga at joyful dot club dot ne dot jp Kenji Nagamatsu: naga at joyful dot club dot ne dot jp
Iwasa Kazmi: [unreachable] iwasa at cosmo-system dot jp Iwasa Kazmi: [unreachable] iwasa at cosmo-system dot jp
......
...@@ -16,9 +16,7 @@ ...@@ -16,9 +16,7 @@
Originally, the script was written in Perl and was known as translator.pl. Originally, the script was written in Perl and was known as translator.pl.
The last Perl version was dated 2002/05/21 (plus some later corrections) The last Perl version was dated 2002/05/21 (plus some later corrections)
$Id$ Petr Prikryl (prikryl at atlas dot cz)
Petr Prikryl (prikrylp@skil.cz)
History: History:
-------- --------
......
...@@ -10,7 +10,7 @@ Macedonian, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, ...@@ -10,7 +10,7 @@ Macedonian, Norwegian, Persian, Polish, Portuguese, Romanian, Russian,
Serbian, SerbianCyrilic, Slovak, Slovene, Spanish, Swedish, Turkish, Serbian, SerbianCyrilic, Slovak, Slovene, Spanish, Swedish, Turkish,
Ukrainian, and Vietnamese. Ukrainian, and Vietnamese.
Of them, 9 translators are up-to-date, 31 translators are based on Of them, 10 translators are up-to-date, 30 translators are based on
some adapter class, and 2 are English based. some adapter class, and 2 are English based.
---------------------------------------------------------------------- ----------------------------------------------------------------------
...@@ -19,6 +19,7 @@ alphabetically). This means that they derive from the Translator class ...@@ -19,6 +19,7 @@ alphabetically). This means that they derive from the Translator class
and they implement all 250 of the required methods. Anyway, there and they implement all 250 of the required methods. Anyway, there
still may be some details listed even for them: still may be some details listed even for them:
TranslatorChinesetraditional -- The MAX_DOT_GRAPH_HEIGHT found in trLegendDocs()
TranslatorCzech TranslatorCzech
TranslatorDutch TranslatorDutch
TranslatorEnglish TranslatorEnglish
...@@ -45,12 +46,7 @@ must be implemented to become up-to-date: ...@@ -45,12 +46,7 @@ must be implemented to become up-to-date:
TranslatorChinese 1.8.2 15 methods to implement (6 %) TranslatorChinese 1.8.2 15 methods to implement (6 %)
TranslatorPortuguese 1.8.0 22 methods to implement (8 %) TranslatorPortuguese 1.8.0 22 methods to implement (8 %)
TranslatorIndonesian 1.8.0 22 methods to implement (8 %) TranslatorIndonesian 1.8.0 22 methods to implement (8 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorDanish 1.8.0 22 methods to implement (8 %) TranslatorDanish 1.8.0 22 methods to implement (8 %)
TranslatorChinesetraditional 1.8.0 22 methods to implement (8 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorCatalan 1.8.0 22 methods to implement (8 %) TranslatorCatalan 1.8.0 22 methods to implement (8 %)
TranslatorBrazilian 1.8.0 22 methods to implement (8 %) TranslatorBrazilian 1.8.0 22 methods to implement (8 %)
TranslatorArmenian 1.8.0 22 methods to implement (8 %) TranslatorArmenian 1.8.0 22 methods to implement (8 %)
...@@ -59,23 +55,13 @@ must be implemented to become up-to-date: ...@@ -59,23 +55,13 @@ must be implemented to become up-to-date:
TranslatorPersian 1.7.5 25 methods to implement (10 %) TranslatorPersian 1.7.5 25 methods to implement (10 %)
TranslatorVietnamese 1.6.0 34 methods to implement (13 %) TranslatorVietnamese 1.6.0 34 methods to implement (13 %)
TranslatorSwedish 1.6.0 34 methods to implement (13 %) TranslatorSwedish 1.6.0 34 methods to implement (13 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorSerbian 1.6.0 34 methods to implement (13 %) TranslatorSerbian 1.6.0 34 methods to implement (13 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorSerbianCyrilic 1.6.0 34 methods to implement (13 %) TranslatorSerbianCyrilic 1.6.0 34 methods to implement (13 %)
TranslatorMacedonian 1.6.0 34 methods to implement (13 %) TranslatorMacedonian 1.6.0 34 methods to implement (13 %)
TranslatorJapanese 1.6.0 33 methods to implement (13 %) TranslatorJapanese 1.6.0 33 methods to implement (13 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorFinnish 1.6.0 34 methods to implement (13 %) TranslatorFinnish 1.6.0 34 methods to implement (13 %)
TranslatorAfrikaans 1.6.0 34 methods to implement (13 %) TranslatorAfrikaans 1.6.0 34 methods to implement (13 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorSlovene 1.4.6 58 methods to implement (23 %) TranslatorSlovene 1.4.6 58 methods to implement (23 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorNorwegian 1.4.6 56 methods to implement (22 %) TranslatorNorwegian 1.4.6 56 methods to implement (22 %)
TranslatorLithuanian 1.4.6 58 methods to implement (23 %) TranslatorLithuanian 1.4.6 58 methods to implement (23 %)
TranslatorHungarian 1.4.6 58 methods to implement (23 %) TranslatorHungarian 1.4.6 58 methods to implement (23 %)
...@@ -348,35 +334,10 @@ TranslatorChinese (TranslatorAdapter_1_8_2) 15 methods to implement (6 %) ...@@ -348,35 +334,10 @@ TranslatorChinese (TranslatorAdapter_1_8_2) 15 methods to implement (6 %)
virtual QCString trInstanceMethods() virtual QCString trInstanceMethods()
TranslatorChinesetraditional (TranslatorAdapter_1_8_0) 22 methods to implement (8 %) TranslatorChinesetraditional (Translator)
---------------------------- ----------------------------
Implements 228 of the required methods (91 %). Implements 250 of the required methods (100 %).
Missing methods (should be implemented):
virtual QCString trDetailLevel()
virtual QCString trTemplateParameters()
virtual QCString trServices()
virtual QCString trClassMethods()
virtual QCString trProvidedByCategory()
virtual QCString trSingletonGeneratedFromFiles(bool single)
virtual QCString trServiceReference(const char * sName)
virtual QCString trDesignOverview()
virtual QCString trAndMore(const QCString & number)
virtual QCString trConstantGroups()
virtual QCString trMethodDocumentation()
virtual QCString trEnumReference(const char * name)
virtual QCString trInheritedFrom(const char * members, const char * what)
virtual QCString trAdditionalInheritedMembers()
virtual QCString trInterfaces()
virtual QCString trServiceGeneratedFromFiles(bool single)
virtual QCString trEnumGeneratedFromFiles(bool single)
virtual QCString trConstantGroupReference(const char * namespaceName)
virtual QCString trPanelSynchronisationTooltip(bool enable)
virtual QCString trExtendsClass()
virtual QCString trSingletonReference(const char * sName)
virtual QCString trInstanceMethods()
TranslatorCroatian (TranslatorAdapter_1_8_2) 15 methods to implement (6 %) TranslatorCroatian (TranslatorAdapter_1_8_2) 15 methods to implement (6 %)
......
...@@ -189,7 +189,7 @@ bool setTranslator(const char *langName) ...@@ -189,7 +189,7 @@ bool setTranslator(const char *langName)
#ifdef LANG_SV #ifdef LANG_SV
else if (L_EQUAL("swedish")) else if (L_EQUAL("swedish"))
{ {
theTranslator=new TranslatorDecoder(new TranslatorSwedish); theTranslator=new TranslatorSwedish;
} }
#endif #endif
#ifdef LANG_CZ #ifdef LANG_CZ
...@@ -207,7 +207,7 @@ bool setTranslator(const char *langName) ...@@ -207,7 +207,7 @@ bool setTranslator(const char *langName)
#ifdef LANG_ID #ifdef LANG_ID
else if (L_EQUAL("indonesian")) else if (L_EQUAL("indonesian"))
{ {
theTranslator=new TranslatorDecoder(new TranslatorIndonesian); theTranslator=new TranslatorIndonesian;
} }
#endif #endif
#ifdef LANG_IT #ifdef LANG_IT
...@@ -225,7 +225,7 @@ bool setTranslator(const char *langName) ...@@ -225,7 +225,7 @@ bool setTranslator(const char *langName)
#ifdef LANG_JP #ifdef LANG_JP
else if (L_EQUAL("japanese")) else if (L_EQUAL("japanese"))
{ {
theTranslator=new TranslatorDecoder(new TranslatorJapanese); theTranslator=new TranslatorJapanese;
} }
#endif #endif
#ifdef LANG_JE #ifdef LANG_JE
...@@ -297,7 +297,7 @@ bool setTranslator(const char *langName) ...@@ -297,7 +297,7 @@ bool setTranslator(const char *langName)
#ifdef LANG_SI #ifdef LANG_SI
else if (L_EQUAL("slovene")) else if (L_EQUAL("slovene"))
{ {
theTranslator=new TranslatorDecoder(new TranslatorSlovene); theTranslator=new TranslatorSlovene;
} }
#endif #endif
#ifdef LANG_CN #ifdef LANG_CN
...@@ -309,7 +309,7 @@ bool setTranslator(const char *langName) ...@@ -309,7 +309,7 @@ bool setTranslator(const char *langName)
#ifdef LANG_TW #ifdef LANG_TW
else if (L_EQUAL("chinese-traditional")) else if (L_EQUAL("chinese-traditional"))
{ {
theTranslator=new TranslatorDecoder(new TranslatorChinesetraditional); theTranslator=new TranslatorChinesetraditional;
} }
#endif #endif
#ifdef LANG_NO #ifdef LANG_NO
...@@ -351,7 +351,7 @@ bool setTranslator(const char *langName) ...@@ -351,7 +351,7 @@ bool setTranslator(const char *langName)
#ifdef LANG_SR #ifdef LANG_SR
else if (L_EQUAL("serbian")) else if (L_EQUAL("serbian"))
{ {
theTranslator=new TranslatorDecoder(new TranslatorSerbian); theTranslator=new TranslatorSerbian;
} }
#endif #endif
#ifdef LANG_SC #ifdef LANG_SC
...@@ -381,7 +381,7 @@ bool setTranslator(const char *langName) ...@@ -381,7 +381,7 @@ bool setTranslator(const char *langName)
#ifdef LANG_ZA #ifdef LANG_ZA
else if (L_EQUAL("afrikaans")) else if (L_EQUAL("afrikaans"))
{ {
theTranslator=new TranslatorDecoder(new TranslatorAfrikaans); theTranslator=new TranslatorAfrikaans;
} }
#endif #endif
#ifdef LANG_AR #ifdef LANG_AR
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#! python2
from __future__ import print_function
import os
import re
import shutil
import subprocess
import sys
import textwrap
def getCurrentSubdirName():
subdir, fname = os.path.split(os.path.realpath(__file__))
return os.path.basename(subdir)
def getCurrentBranchName():
result = None
cmd = 'git branch --list --no-color'
pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE).stdout
for line in pipe:
line = line.decode('utf-8')
if line.startswith('*'):
result = line[2:].rstrip()
pipe.close()
return result
def getUserName():
user = None # init
p = subprocess.Popen('git config user.name', stdout=subprocess.PIPE)
user = p.communicate()[0]
user = user.decode('utf-8')
p.wait()
return user
def getUserInitials():
user = getUserName()
return ''.join(s[0] for s in user.split())
def gitSHA_date_time():
cmd = 'git rev-parse --short HEAD'
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
output = p.communicate()[0]
output = output.decode('ASCII')
p.wait()
sha = output.strip()
cmd = 'git show -s --format="%ci" ' + sha
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
output = p.communicate()[0]
output = output.decode('ASCII')
p.wait()
date = output.strip()
lst = date.split() # string like '2013-06-21 09:23:47 +0200'
dstamp = lst[0].replace('-', '') # '20130621' for the date
tstamp = lst[1].replace(':', '') # '092347' for the time
return sha, dstamp, tstamp
def gitDescribe():
result = None
cmd = 'git describe'
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
descr = p.communicate()[0]
descr = descr.decode('utf-8')
p.wait()
return descr.strip()
def getDoxygenVersion():
# ... from the VERSION file.
sdir, fname = getThisScriptPathAndName()
version_fname = os.path.join(sdir, '..', 'VERSION')
with open(version_fname) as f:
lst = f.readlines()
doxver = lst[0].strip()
m = re.match(r'^(?P<ver>[0-9.]+)(-(?P<date>\d{8}))?', doxver)
assert m
ver = m.group('ver')
return ver
def getThisScriptPathAndName():
script_fname = os.path.realpath(__file__)
sdir, fname = os.path.split(script_fname)
return sdir, fname
def getEmptyDistribDir():
# Get this script full path, name, and the script subdir name
# (for checking the location).
sdir, fname = getThisScriptPathAndName()
subdir = os.path.basename(sdir)
assert subdir == 'winbuild'
# The distribution directory will be a subdirectory of the "../__put"
# (created if it does not exist, not the part of the git repo).
target_dir = os.path.normpath(os.path.join(sdir, '..', '__put'))
if not os.path.exists(target_dir):
os.mkdir(target_dir)
assert os.path.isdir(target_dir)
# The distribution subdir is composed out of 'Doxygen-', version stamp,
# timestamp, and commit id (partial SHA). Ignore the date from the VERSION
# file, take the commit date.
ver = getDoxygenVersion()
sha, dstamp, tstamp = gitSHA_date_time()
dist_subdir = 'Doxygen-' + ver + '-' + dstamp + tstamp
dist_dir = os.path.join(target_dir, dist_subdir)
print(dist_dir)
if os.path.isdir(dist_dir):
print("Removing the existing '{}'".format(dist_dir))
shutil.rmtree(dist_dir)
assert not os.path.exists(dist_dir)
print("Creating the new '{}'".format(dist_dir))
os.mkdir(dist_dir)
assert os.path.isdir(dist_dir)
return dist_dir
def copyBinaries(dist_dir, subdir):
'''Copy the Windows binaries (doxygen.exe only) to the dist_dir directory.'''
# Source file should exist.
sdir, fname = getThisScriptPathAndName()
src = os.path.normpath(os.path.join(sdir, '..', 'bin', subdir, 'doxygen.exe'))
assert os.path.isfile(src)
# Destination directory must not exist. It must be created first.
dst_dir = os.path.normpath(os.path.join(dist_dir, 'bin', subdir))
assert not os.path.isdir(dst_dir)
os.makedirs(dst_dir)
# Copy the file.
print("Copying '{}'".format(src))
shutil.copy2(src, dst_dir)
def getBinariesZipBareName():
ver = getDoxygenVersion()
sha, dstamp, tstamp = gitSHA_date_time()
fname = 'doxygenw{}_{}.zip'.format(dstamp, ver.replace('.', '_'))
return fname
def getTranslatorReportZipBareName():
ver = getDoxygenVersion()
sha, dstamp, tstamp = gitSHA_date_time()
fname = 'tr{}_{}.zip'.format(dstamp, ver.replace('.', '_'))
return fname
def zipBinaries(distr_dir):
# Build the zip filename. It is to be located at the same level as distr_dir.
zip_bare_name = getBinariesZipBareName()
dst, distr_subdir = os.path.split(distr_dir)
zip_full_name = os.path.join(dst, zip_bare_name)
if os.path.isfile(zip_full_name):
print("Removing the existing '{}'".format(zip_full_name))
os.remove(zip_full_name)
# Change the working directory to destination directory and zip from
# there using the bare names so that the full path is not zipped inside.
wd = os.getcwd()
os.chdir(dst)
print("Zipping new '{}'".format(zip_full_name))
subprocess.call('zip -r {} {}'.format(zip_bare_name, distr_subdir), shell=True)
os.chdir(wd) # back to the original working directory
def buildAndZipTranslatorReport(distr_dir):
# Build the translator report zip filename. It is to be located at the same
# level as distr_dir.
zip_bare_name = getTranslatorReportZipBareName()
dst, subdir = os.path.split(distr_dir)
zip_full_name = os.path.join(dst, zip_bare_name)
if os.path.isfile(zip_full_name):
print("Removing the existing '{}'".format(zip_full_name))
os.remove(zip_full_name)
print("Zipping new '{}'".format(zip_full_name))
# Change the working directory to the doc one and generate
# the translator report.
sdir, fname = getThisScriptPathAndName()
docdir = os.path.join(sdir, '..', 'doc')
assert os.path.isdir(docdir)
wd = os.getcwd()
os.chdir(docdir)
subprocess.call('python translator.py', shell=True)
# Zip the generated translator_report.txt.
subprocess.call('zip -r {} {}'.format(zip_full_name,
'translator_report.txt'), shell=True)
os.chdir(wd) # back to the original working directory
def xxx():
# Vytvoříme dopis.
subject = 'Windows binaries available for %s in SVN' % doxdir
subject = subject.replace(' ', '%20')
body = textwrap.dedent('''\
Hi,
If interested, you can download the doxygen binaries
compiled for MS Windows from
http://sourceforge.net/projects/doxygen/files/snapshots/doxygen-1.8-svn/windows
This is the place where you should find also the next
releases. Name of the archive file is
%s
The related translator report can be found inside the directory
http://sourceforge.net/projects/doxygen/files/snapshots/doxygen-1.8-svn/translator_reports/
Name of the archive file is
%s
The binaries are NOT created automatically, so it may
happen that some newer SVN sources were not compiled
because I am not present to do that or I forgot... ;)
Regards,
Petr
--
Petr Prikryl (prikryl at atlas dot cz)''') % (doxzipname, trzipname)
body = body.replace('\n', '%0d')
# Zkonstruujeme URI a spustíme mailer pro odeslání dopisu.
to_addr = 'doxygen-users@lists.sourceforge.net'
mailtoURI = 'mailto:%s?subject=%s&body=%s' % (to_addr, subject, body)
os.startfile(mailtoURI)
if __name__ == '__main__':
# Create the empty directory for the distribution files.
dist_dir = getEmptyDistribDir()
# Copy the compiled binaries to the distribution directory and zip them.
copyBinaries(dist_dir, 'Debug')
copyBinaries(dist_dir, 'Debug64')
copyBinaries(dist_dir, 'Release')
copyBinaries(dist_dir, 'Release64')
zipBinaries(dist_dir)
# The translator report...
buildAndZipTranslatorReport(dist_dir)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment