diff options
author | Jennifer Liebel <jliebel94@gmail.com> | 2014-09-12 07:22:06 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-09-15 10:19:02 +0000 |
commit | 721f1eca1856ab42d1752bca22c87d87713cf1e7 (patch) | |
tree | 5e4b8175bdc44fb47be54fda2e60a53706cefe8a /wizards | |
parent | a8c8f92d3de7eab7fc385ca4d630487e2d10ce0e (diff) |
fdo#75107: make colors and styles localizable in Agenda Wizard
Change-Id: I231370da5ee7185888ec95ba1fb64f678a7c8ea3
Reviewed-on: https://gerrit.libreoffice.org/11412
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'wizards')
3 files changed, 72 insertions, 9 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py index 99aced710e71..ede7aaad640b 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py @@ -74,7 +74,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): self.myAgendaDoc = AgendaDocument( self.xMSF, self.agenda, self.resources, self.templateConsts, self.terminateListener) - self.initializeTemplates() + self.initializeTemplates() self.myAgendaDoc.load( self.agendaTemplates[1][self.agenda.cp_AgendaType]) @@ -187,7 +187,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): RadioDataAware.attachRadioButtons( self.agenda, "cp_ProceedMethod", (self.optCreateAgenda, self.optMakeChanges), True).updateUI() - + def insertRoadmap(self): self.addRoadmap() self.insertRoadMapItems( @@ -204,7 +204,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): try: sAgendaPath = self.sTemplatePath + "/wizard/agenda" self.agendaTemplates = FileAccess.getFolderTitles( - self.xMSF, "aw", sAgendaPath) + self.xMSF, "aw", sAgendaPath, self.resources.dictPageDesign) return True except NoValidPathException: traceback.print_exc() @@ -311,7 +311,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): # user said: no, do not overwrite endWizard = False return False - + xDocProps = self.myAgendaDoc.xTextDocument.DocumentProperties xDocProps.Title = self.txtTemplateName.Text self.myAgendaDoc.setWizardTemplateDocInfo( \ @@ -372,7 +372,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): def drawConstants(self): '''Localise the template''' constRangeList = self.myAgendaDoc.searchFillInItems(1) - + for i in constRangeList: text = i.String.lower() aux = TextElement(i, self.resources.dictConstants[text]) diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py index 4f2fe2b99187..292059cce2a7 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py +++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py @@ -17,7 +17,7 @@ # class AgendaWizardDialogResources(object): - + RID_AGENDAWIZARDDIALOG_START = 5000 RID_AGENDAWIZARDROADMAP_START = 5049 RID_COMMON_START = 500 @@ -153,7 +153,7 @@ class AgendaWizardDialogResources(object): self.resButtonUp = oWizardResource.getResText( AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 70) self.resButtonDown = oWizardResource.getResText( - AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 71) + AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 71) #Create a dictionary for localised string in the template self.dictConstants = { @@ -188,11 +188,34 @@ class AgendaWizardDialogResources(object): "#deadline#" : oWizardResource.getResText( AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 86)} + #Create a dictionary for localising the page design + self.dictPageDesign = { + "Blue" : oWizardResource.getResText( + AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 87), + "Classic" : oWizardResource.getResText( + AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 88), + "Colorful" : oWizardResource.getResText( + AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 89), + "Elegant" : oWizardResource.getResText( + AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 90), + "Green" : oWizardResource.getResText( + AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 91), + "Grey" : oWizardResource.getResText( + AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 92), + "Modern" : oWizardResource.getResText( + AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 93), + "Orange" : oWizardResource.getResText( + AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 94), + "Red" : oWizardResource.getResText( + AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 95), + "Simple" : oWizardResource.getResText( + AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 96)} + #Common Resources self.resOverwriteWarning = oWizardResource.getResText( AgendaWizardDialogResources.RID_COMMON_START + 19) self.resTemplateDescription = oWizardResource.getResText( AgendaWizardDialogResources.RID_COMMON_START + 20) - + self.RoadmapLabels = oWizardResource.getResArray( - AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 1 , 6) + AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 1 , 6) diff --git a/wizards/source/formwizard/dbwizres.src b/wizards/source/formwizard/dbwizres.src index 3680979b2f61..a27cf7b1ec8f 100644 --- a/wizards/source/formwizard/dbwizres.src +++ b/wizards/source/formwizard/dbwizres.src @@ -3627,5 +3627,45 @@ String RID_AGENDAWIZARDDIALOG_START +86 { Text [en-US ] = "Deadline:"; }; +String RID_AGENDAWIZARDDIALOG_START +87 +{ + Text [en-US ] = "Blue"; +}; +String RID_AGENDAWIZARDDIALOG_START +88 +{ + Text [en-US ] = "Classic"; +}; +String RID_AGENDAWIZARDDIALOG_START +89 +{ + Text [en-US ] = "Colorful"; +}; +String RID_AGENDAWIZARDDIALOG_START +90 +{ + Text [en-US ] = "Elegant"; +}; +String RID_AGENDAWIZARDDIALOG_START +91 +{ + Text [en-US ] = "Green"; +}; +String RID_AGENDAWIZARDDIALOG_START +92 +{ + Text [en-US ] = "Grey"; +}; +String RID_AGENDAWIZARDDIALOG_START +93 +{ + Text [en-US ] = "Modern"; +}; +String RID_AGENDAWIZARDDIALOG_START +94 +{ + Text [en-US ] = "Orange"; +}; +String RID_AGENDAWIZARDDIALOG_START +95 +{ + Text [en-US ] = "Red"; +}; +String RID_AGENDAWIZARDDIALOG_START +96 +{ + Text [en-US ] = "Simple"; +}; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |