Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
1a2ea259
Kaydet (Commit)
1a2ea259
authored
Ara 10, 2012
tarafından
László Németh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
some Python 3.3 port (not important for LO 4.0)
Change-Id: Id151d59a9bab2454b9d359aefb5c35a9f05bb9ce
üst
02e22028
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
parse.py
sc/workben/celltrans/parse.py
+13
-11
No files found.
sc/workben/celltrans/parse.py
Dosyayı görüntüle @
1a2ea259
...
...
@@ -22,7 +22,7 @@ import sys
localeNames
=
{
'fr'
:
'French'
,
'hu'
:
'Hungarian'
,
'de'
:
'German'
}
def
getLocaleName
(
code
):
global
localeNames
if
localeNames
.
has_key
(
code
)
:
if
code
in
localeNames
:
return
localeNames
[
code
]
else
:
return
"(unknown locale)"
...
...
@@ -39,7 +39,7 @@ class LocaleData(object):
self
.
funcList
=
{}
def
addKeywordMap
(
self
,
funcName
,
localeName
,
engName
):
if
not
self
.
funcList
.
has_key
(
funcName
)
:
if
not
funcName
in
self
.
funcList
:
self
.
funcList
[
funcName
]
=
[]
self
.
funcList
[
funcName
]
.
append
([
localeName
,
engName
])
...
...
@@ -54,13 +54,12 @@ class LocaleData(object):
chars
+=
"// "
+
"-"
*
75
+
"
\n
"
chars
+=
"//
%
s language locale (automatically generated)
\n
"
%
getLocaleName
(
self
.
locale
)
chars
+=
"// "
+
"-"
*
75
+
"
\n
"
chars
+=
"static const Locale a"
+
self
.
locale
.
capitalize
()
+
"(OUString
::createFromAscii
(
\"
"
chars
+=
"static const Locale a"
+
self
.
locale
.
capitalize
()
+
"(OUString
(RTL_CONSTASCII_USTRINGPARAM
(
\"
"
chars
+=
self
.
locale
chars
+=
"
\"
), OUString(), OUString());
\n\n
"
chars
+=
"
\"
)
)
, OUString(), OUString());
\n\n
"
# pre instantiations of localized function names.
funcs
=
self
.
funcList
.
keys
()
funcs
.
sort
()
funcs
=
sorted
(
self
.
funcList
.
keys
())
chars
+=
"// pre instantiations of localized function names
\n
"
for
func
in
funcs
:
for
item
in
self
.
funcList
[
func
]:
...
...
@@ -115,9 +114,12 @@ class Parser(object):
def
getDByte
(
self
):
# Assume little endian.
bh
=
ord
(
self
.
bytes
[
self
.
i
])
bl
=
ord
(
self
.
bytes
[
self
.
i
+
1
])
dbyte
=
bl
*
256
+
bh
bh
=
self
.
bytes
[
self
.
i
]
bl
=
self
.
bytes
[
self
.
i
+
1
]
try
:
dbyte
=
ord
(
bl
)
*
256
+
ord
(
bh
)
except
:
dbyte
=
bl
*
256
+
bh
self
.
i
+=
2
return
dbyte
...
...
@@ -134,11 +136,11 @@ class Parser(object):
for
item
in
buf
:
sys
.
stdout
.
write
(
chr
(
item
))
if
linefeed
:
print
''
print
(
''
)
def
parse
(
self
):
file
=
open
(
self
.
infile
,
'r'
)
file
=
open
(
self
.
infile
,
'r
b
'
)
self
.
bytes
=
file
.
read
()
file
.
close
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment