LetterWizardDialogResources.py 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. #
  2. # This file is part of the LibreOffice project.
  3. #
  4. # This Source Code Form is subject to the terms of the Mozilla Public
  5. # License, v. 2.0. If a copy of the MPL was not distributed with this
  6. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7. #
  8. # This file incorporates work covered by the following license notice:
  9. #
  10. # Licensed to the Apache Software Foundation (ASF) under one or more
  11. # contributor license agreements. See the NOTICE file distributed
  12. # with this work for additional information regarding copyright
  13. # ownership. The ASF licenses this file to you under the Apache
  14. # License, Version 2.0 (the "License"); you may not use this file
  15. # except in compliance with the License. You may obtain a copy of
  16. # the License at http://www.apache.org/licenses/LICENSE-2.0 .
  17. #
  18. class LetterWizardDialogResources(object):
  19. def __init__(self):
  20. import sys, os
  21. if sys.version_info < (3,4):
  22. import imp
  23. imp.load_source('strings', os.path.join(os.path.dirname(__file__), '../common/strings.hrc'))
  24. import strings
  25. elif sys.version_info < (3,7):
  26. # imp is deprecated since Python v.3.4
  27. from importlib.machinery import SourceFileLoader
  28. SourceFileLoader('strings', os.path.join(os.path.dirname(__file__), '../common/strings.hrc')).load_module()
  29. import strings
  30. else:
  31. # have to jump through hoops since 3.7, partly because python does not like loading modules that do have a .py extension
  32. import importlib
  33. import importlib.util
  34. import importlib.machinery
  35. module_name = 'strings'
  36. path = os.path.join(os.path.dirname(__file__), '../common/strings.hrc')
  37. spec = importlib.util.spec_from_loader(
  38. module_name,
  39. importlib.machinery.SourceFileLoader(module_name, path)
  40. )
  41. module = importlib.util.module_from_spec(spec)
  42. spec.loader.exec_module(module)
  43. sys.modules[module_name] = module
  44. strings = module
  45. import strings
  46. self.resLetterWizardDialog_title = strings.RID_LETTERWIZARDDIALOG_START_1
  47. self.resLabel9_value = strings.RID_LETTERWIZARDDIALOG_START_2
  48. self.resoptBusinessLetter_value = strings.RID_LETTERWIZARDDIALOG_START_3
  49. self.resoptPrivOfficialLetter_value = strings.RID_LETTERWIZARDDIALOG_START_4
  50. self.resoptPrivateLetter_value = strings.RID_LETTERWIZARDDIALOG_START_5
  51. self.reschkBusinessPaper_value = strings.RID_LETTERWIZARDDIALOG_START_6
  52. self.reschkPaperCompanyLogo_value = strings.RID_LETTERWIZARDDIALOG_START_7
  53. self.reschkPaperCompanyAddress_value = strings.RID_LETTERWIZARDDIALOG_START_8
  54. self.reschkPaperFooter_value = strings.RID_LETTERWIZARDDIALOG_START_9
  55. self.reschkCompanyReceiver_value = strings.RID_LETTERWIZARDDIALOG_START_10
  56. self.reschkUseLogo_value = strings.RID_LETTERWIZARDDIALOG_START_11
  57. self.reschkUseAddressReceiver_value = strings.RID_LETTERWIZARDDIALOG_START_12
  58. self.reschkUseSigns_value = strings.RID_LETTERWIZARDDIALOG_START_13
  59. self.reschkUseSubject_value = strings.RID_LETTERWIZARDDIALOG_START_14
  60. self.reschkUseSalutation_value = strings.RID_LETTERWIZARDDIALOG_START_15
  61. self.reschkUseBendMarks_value = strings.RID_LETTERWIZARDDIALOG_START_16
  62. self.reschkUseGreeting_value = strings.RID_LETTERWIZARDDIALOG_START_17
  63. self.reschkUseFooter_value = strings.RID_LETTERWIZARDDIALOG_START_18
  64. self.resoptSenderPlaceholder_value = strings.RID_LETTERWIZARDDIALOG_START_19
  65. self.resoptSenderDefine_value = strings.RID_LETTERWIZARDDIALOG_START_20
  66. self.resoptReceiverPlaceholder_value = strings.RID_LETTERWIZARDDIALOG_START_21
  67. self.resoptReceiverDatabase_value = strings.RID_LETTERWIZARDDIALOG_START_22
  68. self.reschkFooterNextPages_value = strings.RID_LETTERWIZARDDIALOG_START_23
  69. self.reschkFooterPageNumbers_value = strings.RID_LETTERWIZARDDIALOG_START_24
  70. self.restxtTemplateName_value = strings.RID_LETTERWIZARDDIALOG_START_25
  71. self.resoptCreateLetter_value = strings.RID_LETTERWIZARDDIALOG_START_26
  72. self.resoptMakeChanges_value = strings.RID_LETTERWIZARDDIALOG_START_27
  73. self.reslblBusinessStyle_value = strings.RID_LETTERWIZARDDIALOG_START_28
  74. self.reslblPrivOfficialStyle_value = strings.RID_LETTERWIZARDDIALOG_START_29
  75. self.reslblPrivateStyle_value = strings.RID_LETTERWIZARDDIALOG_START_30
  76. self.reslblIntroduction_value = strings.RID_LETTERWIZARDDIALOG_START_31
  77. self.reslblLogoHeight_value = strings.RID_LETTERWIZARDDIALOG_START_32
  78. self.reslblLogoWidth_value = strings.RID_LETTERWIZARDDIALOG_START_33
  79. self.reslblLogoX_value = strings.RID_LETTERWIZARDDIALOG_START_34
  80. self.reslblLogoY_value = strings.RID_LETTERWIZARDDIALOG_START_35
  81. self.reslblAddressHeight_value = strings.RID_LETTERWIZARDDIALOG_START_36
  82. self.reslblAddressWidth_value = strings.RID_LETTERWIZARDDIALOG_START_37
  83. self.reslblAddressX_value = strings.RID_LETTERWIZARDDIALOG_START_38
  84. self.reslblAddressY_value = strings.RID_LETTERWIZARDDIALOG_START_39
  85. self.reslblFooterHeight_value = strings.RID_LETTERWIZARDDIALOG_START_40
  86. self.reslblSenderAddress_value = strings.RID_LETTERWIZARDDIALOG_START_42
  87. self.reslblSenderName_value = strings.RID_LETTERWIZARDDIALOG_START_43
  88. self.reslblSenderStreet_value = strings.RID_LETTERWIZARDDIALOG_START_44
  89. self.reslblPostCodeCity_value = strings.RID_LETTERWIZARDDIALOG_START_45
  90. self.reslblReceiverAddress_value = strings.RID_LETTERWIZARDDIALOG_START_46
  91. self.reslblFooter_value = strings.RID_LETTERWIZARDDIALOG_START_47
  92. self.reslblFinalExplanation1_value = strings.RID_LETTERWIZARDDIALOG_START_48
  93. self.reslblFinalExplanation2_value = strings.RID_LETTERWIZARDDIALOG_START_49
  94. self.reslblTemplateName_value = strings.RID_LETTERWIZARDDIALOG_START_50
  95. self.reslblTemplatePath_value = strings.RID_LETTERWIZARDDIALOG_START_51
  96. self.reslblProceed_value = strings.RID_LETTERWIZARDDIALOG_START_52
  97. self.reslblTitle1_value = strings.RID_LETTERWIZARDDIALOG_START_53
  98. self.reslblTitle3_value = strings.RID_LETTERWIZARDDIALOG_START_54
  99. self.reslblTitle2_value = strings.RID_LETTERWIZARDDIALOG_START_55
  100. self.reslblTitle4_value = strings.RID_LETTERWIZARDDIALOG_START_56
  101. self.reslblTitle5_value = strings.RID_LETTERWIZARDDIALOG_START_57
  102. self.reslblTitle6_value = strings.RID_LETTERWIZARDDIALOG_START_58
  103. #Create a Dictionary for the constants values.
  104. self.dictConstants = {
  105. "#subjectconst#" : strings.RID_LETTERWIZARDDIALOG_START_59}
  106. #Create a dictionary for localising the business templates
  107. self.dictBusinessTemplate = {
  108. "Elegant" : strings.RID_LETTERWIZARDDIALOG_START_60,
  109. "Modern" : strings.RID_LETTERWIZARDDIALOG_START_61,
  110. "Office" : strings.RID_LETTERWIZARDDIALOG_START_62}
  111. #Create a dictionary for localising the official templates
  112. self.dictOfficialTemplate = {
  113. "Elegant" : strings.RID_LETTERWIZARDDIALOG_START_60,
  114. "Modern" : strings.RID_LETTERWIZARDDIALOG_START_61,
  115. "Office" : strings.RID_LETTERWIZARDDIALOG_START_62}
  116. #Create a dictionary for localising the private templates
  117. self.dictPrivateTemplate = {
  118. "Bottle" : strings.RID_LETTERWIZARDDIALOG_START_63,
  119. "Mail" : strings.RID_LETTERWIZARDDIALOG_START_64,
  120. "Marine" : strings.RID_LETTERWIZARDDIALOG_START_65,
  121. "Red Line" : strings.RID_LETTERWIZARDDIALOG_START_66}
  122. #Common Resources
  123. self.resOverwriteWarning = strings.RID_COMMON_START_19
  124. self.resTemplateDescription = strings.RID_COMMON_START_20
  125. self.RoadmapLabels = []
  126. self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_1)
  127. self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_2)
  128. self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_3)
  129. self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_4)
  130. self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_5)
  131. self.RoadmapLabels.append(strings.RID_LETTERWIZARDROADMAP_START_6)
  132. self.SalutationLabels = []
  133. self.SalutationLabels.append(strings.RID_LETTERWIZARDSALUTATION_START_1)
  134. self.SalutationLabels.append(strings.RID_LETTERWIZARDSALUTATION_START_2)
  135. self.SalutationLabels.append(strings.RID_LETTERWIZARDSALUTATION_START_3)
  136. self.GreetingLabels = []
  137. self.GreetingLabels.append(strings.RID_LETTERWIZARDGREETING_START_1)
  138. self.GreetingLabels.append(strings.RID_LETTERWIZARDGREETING_START_2)
  139. self.GreetingLabels.append(strings.RID_LETTERWIZARDGREETING_START_3)