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
60211510
Kaydet (Commit)
60211510
authored
Eki 03, 2012
tarafından
Xisco Fauli
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
pywizard: localise listbox at runtime
Change-Id: I667976f7f76776cc3ef76abe9935271a7a0c2923
üst
789c4825
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
8 deletions
+33
-8
FileAccess.py
wizards/com/sun/star/wizards/common/FileAccess.py
+8
-3
FaxWizardDialogImpl.py
wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+5
-5
FaxWizardDialogResources.py
wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
+20
-0
No files found.
wizards/com/sun/star/wizards/common/FileAccess.py
Dosyayı görüntüle @
60211510
...
...
@@ -307,7 +307,7 @@ class FileAccess(object):
return
False
@classmethod
def
getFolderTitles
(
self
,
xMSF
,
FilterName
,
FolderName
):
def
getFolderTitles
(
self
,
xMSF
,
FilterName
,
FolderName
,
resDict
):
#Returns and ordered dict containing the template's name and path
LocLayoutFiles
=
{}
...
...
@@ -321,12 +321,17 @@ class FileAccess(object):
FilterName
=
None
else
:
FilterName
+=
"-"
for
i
in
nameList
:
fileName
=
self
.
getFilename
(
i
)
if
FilterName
is
None
or
fileName
.
startswith
(
FilterName
):
xDocInterface
.
loadFromMedium
(
i
,
tuple
())
LocLayoutFiles
[
xDocInterface
.
Title
]
=
i
if
xDocInterface
.
Title
in
resDict
:
# localise string at runtime
title
=
resDict
[
xDocInterface
.
Title
]
else
:
title
=
xDocInterface
.
Title
LocLayoutFiles
[
title
]
=
i
except
Exception
,
exception
:
traceback
.
print_exc
()
...
...
wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
Dosyayı görüntüle @
60211510
...
...
@@ -299,9 +299,9 @@ class FaxWizardDialogImpl(FaxWizardDialog):
"/wizard/fax"
)
self
.
sWorkPath
=
FileAccess
.
getOfficePath2
(
xMSF
,
"Work"
,
""
,
""
)
self
.
BusinessFiles
=
FileAccess
.
getFolderTitles
(
xMSF
,
"bus"
,
self
.
sFaxPath
)
self
.
sFaxPath
,
self
.
resources
.
dictBusinessTemplate
)
self
.
PrivateFiles
=
FileAccess
.
getFolderTitles
(
xMSF
,
"pri"
,
self
.
sFaxPath
)
self
.
sFaxPath
,
self
.
resources
.
dictPrivateTemplate
)
self
.
setControlProperty
(
"lstBusinessStyle"
,
"StringItemList"
,
tuple
(
self
.
BusinessFiles
.
keys
()))
...
...
@@ -327,17 +327,17 @@ class FaxWizardDialogImpl(FaxWizardDialog):
self
.
myFaxDoc
.
updateDateFields
()
def
initializeSalutation
(
self
):
#'Saludation'
dropdown list
#'Saludation'
listbox
self
.
setControlProperty
(
"lstSalutation"
,
"StringItemList"
,
tuple
(
self
.
resources
.
SalutationLabels
))
def
initializeGreeting
(
self
):
#'Complimentary Close'
dropdown list
#'Complimentary Close'
listbox
self
.
setControlProperty
(
"lstGreeting"
,
"StringItemList"
,
tuple
(
self
.
resources
.
GreetingLabels
))
def
initializeCommunication
(
self
):
#'Type of message'
dropdown list
#'Type of message'
listbox
self
.
setControlProperty
(
"lstCommunicationType"
,
"StringItemList"
,
tuple
(
self
.
resources
.
CommunicationLabels
))
...
...
wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
Dosyayı görüntüle @
60211510
...
...
@@ -140,6 +140,26 @@ class FaxWizardDialogResources(Resource):
FaxWizardDialogResources
.
RID_FAXWIZARDDIALOG_START
+
47
),
FaxWizardDialogResources
.
resConsist3PlaceHolder
:
self
.
getResText
(
FaxWizardDialogResources
.
RID_FAXWIZARDDIALOG_START
+
48
)}
#Create a dictionary for localising the private template
self
.
dictPrivateTemplate
=
{
"Bottle"
:
self
.
getResText
(
FaxWizardDialogResources
.
RID_FAXWIZARDDIALOG_START
+
49
),
"Lines"
:
self
.
getResText
(
FaxWizardDialogResources
.
RID_FAXWIZARDDIALOG_START
+
50
),
"Marine"
:
self
.
getResText
(
FaxWizardDialogResources
.
RID_FAXWIZARDDIALOG_START
+
51
)}
#Create a dictionary for localising the business template
self
.
dictBusinessTemplate
=
{
"Classic Fax"
:
self
.
getResText
(
FaxWizardDialogResources
.
RID_FAXWIZARDDIALOG_START
+
52
),
"Classic Fax from Private"
:
self
.
getResText
(
FaxWizardDialogResources
.
RID_FAXWIZARDDIALOG_START
+
53
),
"Modern Fax"
:
self
.
getResText
(
FaxWizardDialogResources
.
RID_FAXWIZARDDIALOG_START
+
54
),
"Modern Fax from Private"
:
self
.
getResText
(
FaxWizardDialogResources
.
RID_FAXWIZARDDIALOG_START
+
55
)}
#Common Resources
self
.
resOverwriteWarning
=
self
.
getResText
(
...
...
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