Kaydet (Commit) 721f1eca authored tarafından Jennifer Liebel's avatar Jennifer Liebel Kaydeden (comit) Andras Timar

fdo#75107: make colors and styles localizable in Agenda Wizard

Change-Id: I231370da5ee7185888ec95ba1fb64f678a7c8ea3
Reviewed-on: https://gerrit.libreoffice.org/11412Reviewed-by: 's avatarAndras Timar <andras.timar@collabora.com>
Tested-by: 's avatarAndras Timar <andras.timar@collabora.com>
üst a8c8f92d
...@@ -74,7 +74,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): ...@@ -74,7 +74,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
self.myAgendaDoc = AgendaDocument( self.myAgendaDoc = AgendaDocument(
self.xMSF, self.agenda, self.resources, self.xMSF, self.agenda, self.resources,
self.templateConsts, self.terminateListener) self.templateConsts, self.terminateListener)
self.initializeTemplates() self.initializeTemplates()
self.myAgendaDoc.load( self.myAgendaDoc.load(
self.agendaTemplates[1][self.agenda.cp_AgendaType]) self.agendaTemplates[1][self.agenda.cp_AgendaType])
...@@ -187,7 +187,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): ...@@ -187,7 +187,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
RadioDataAware.attachRadioButtons( RadioDataAware.attachRadioButtons(
self.agenda, "cp_ProceedMethod", self.agenda, "cp_ProceedMethod",
(self.optCreateAgenda, self.optMakeChanges), True).updateUI() (self.optCreateAgenda, self.optMakeChanges), True).updateUI()
def insertRoadmap(self): def insertRoadmap(self):
self.addRoadmap() self.addRoadmap()
self.insertRoadMapItems( self.insertRoadMapItems(
...@@ -204,7 +204,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): ...@@ -204,7 +204,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
try: try:
sAgendaPath = self.sTemplatePath + "/wizard/agenda" sAgendaPath = self.sTemplatePath + "/wizard/agenda"
self.agendaTemplates = FileAccess.getFolderTitles( self.agendaTemplates = FileAccess.getFolderTitles(
self.xMSF, "aw", sAgendaPath) self.xMSF, "aw", sAgendaPath, self.resources.dictPageDesign)
return True return True
except NoValidPathException: except NoValidPathException:
traceback.print_exc() traceback.print_exc()
...@@ -311,7 +311,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): ...@@ -311,7 +311,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
# user said: no, do not overwrite # user said: no, do not overwrite
endWizard = False endWizard = False
return False return False
xDocProps = self.myAgendaDoc.xTextDocument.DocumentProperties xDocProps = self.myAgendaDoc.xTextDocument.DocumentProperties
xDocProps.Title = self.txtTemplateName.Text xDocProps.Title = self.txtTemplateName.Text
self.myAgendaDoc.setWizardTemplateDocInfo( \ self.myAgendaDoc.setWizardTemplateDocInfo( \
...@@ -372,7 +372,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog): ...@@ -372,7 +372,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
def drawConstants(self): def drawConstants(self):
'''Localise the template''' '''Localise the template'''
constRangeList = self.myAgendaDoc.searchFillInItems(1) constRangeList = self.myAgendaDoc.searchFillInItems(1)
for i in constRangeList: for i in constRangeList:
text = i.String.lower() text = i.String.lower()
aux = TextElement(i, self.resources.dictConstants[text]) aux = TextElement(i, self.resources.dictConstants[text])
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
# #
class AgendaWizardDialogResources(object): class AgendaWizardDialogResources(object):
RID_AGENDAWIZARDDIALOG_START = 5000 RID_AGENDAWIZARDDIALOG_START = 5000
RID_AGENDAWIZARDROADMAP_START = 5049 RID_AGENDAWIZARDROADMAP_START = 5049
RID_COMMON_START = 500 RID_COMMON_START = 500
...@@ -153,7 +153,7 @@ class AgendaWizardDialogResources(object): ...@@ -153,7 +153,7 @@ class AgendaWizardDialogResources(object):
self.resButtonUp = oWizardResource.getResText( self.resButtonUp = oWizardResource.getResText(
AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 70) AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 70)
self.resButtonDown = oWizardResource.getResText( self.resButtonDown = oWizardResource.getResText(
AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 71) AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 71)
#Create a dictionary for localised string in the template #Create a dictionary for localised string in the template
self.dictConstants = { self.dictConstants = {
...@@ -188,11 +188,34 @@ class AgendaWizardDialogResources(object): ...@@ -188,11 +188,34 @@ class AgendaWizardDialogResources(object):
"#deadline#" : oWizardResource.getResText( "#deadline#" : oWizardResource.getResText(
AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 86)} 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 #Common Resources
self.resOverwriteWarning = oWizardResource.getResText( self.resOverwriteWarning = oWizardResource.getResText(
AgendaWizardDialogResources.RID_COMMON_START + 19) AgendaWizardDialogResources.RID_COMMON_START + 19)
self.resTemplateDescription = oWizardResource.getResText( self.resTemplateDescription = oWizardResource.getResText(
AgendaWizardDialogResources.RID_COMMON_START + 20) AgendaWizardDialogResources.RID_COMMON_START + 20)
self.RoadmapLabels = oWizardResource.getResArray( self.RoadmapLabels = oWizardResource.getResArray(
AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 1 , 6) AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 1 , 6)
...@@ -3627,5 +3627,45 @@ String RID_AGENDAWIZARDDIALOG_START +86 ...@@ -3627,5 +3627,45 @@ String RID_AGENDAWIZARDDIALOG_START +86
{ {
Text [en-US ] = "Deadline:"; 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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