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
2fc50ff8
Kaydet (Commit)
2fc50ff8
authored
Mar 31, 2014
tarafından
László Németh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#75109 librelogo: fix localized procedures
Change-Id: Ia6edb02b871a41828758ba5fd5376c811c4084cc
üst
6ef6e882
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
LibreLogo.py
librelogo/source/LibreLogo/LibreLogo.py
+6
-1
No files found.
librelogo/source/LibreLogo/LibreLogo.py
Dosyayı görüntüle @
2fc50ff8
...
...
@@ -1703,11 +1703,16 @@ def __compil__(s):
if
len
(
subnames
)
>
0
:
globs
=
"global
%
s"
%
", "
.
join
(
subnames
)
# search user functions (function calls with two or more arguments need explicite Python parentheses)
ends
=
__l12n__
(
_
.
lng
)[
"END"
]
# support multiple names of "END"
firstend
=
ends
.
split
(
"|"
)[
0
]
s
=
re
.
sub
(
r"(?<!:)\b(?:
%
s)\b"
%
ends
,
firstend
,
s
)
__l12n__
(
_
.
lng
)[
"END"
]
=
firstend
functions
+=
[
re
.
findall
(
"(?u)
\
w+"
,
i
[
0
])[
0
]
for
i
in
re
.
findall
(
r"""(?iu)(?<=__def__ )([^\n]*)\n # beginning of a procedure
(?:[^\n]*(?<!\b(
%(END)
s))\n)* # 0 or more lines (not END)
[^\n]*\b(?:
%(OUTPUT)
s)\b[^\n]*\n # line with OUTPUT (functions = procedures with OUTPUT)
(?:[^\n]*(?<!\b(?:
%(END)
s))\n)* # 0 or more lines (not END)
[ \t]*\b(?:
%(END)
s)\b"""
%
__l12n__
(
_
.
lng
),
s
,
re
.
X
)
]
# final END (XXX multiple names of "END" doesn't supported)
[ \t]*\b(?:
%(END)
s)\b"""
%
__l12n__
(
_
.
lng
),
s
,
re
.
X
)
]
__l12n__
(
_
.
lng
)[
"END"
]
=
ends
# add line breaks before procedure calls
procedures
=
set
(
subnames
)
-
set
(
functions
)
if
len
(
procedures
)
>
0
:
...
...
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