FaxWizardDialogResources.py 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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 FaxWizardDialogResources(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. self.resFaxWizardDialog_title = strings.RID_FAXWIZARDDIALOG_START_1
  46. self.resoptBusinessFax_value = strings.RID_FAXWIZARDDIALOG_START_3
  47. self.resoptPrivateFax_value = strings.RID_FAXWIZARDDIALOG_START_4
  48. self.reschkUseLogo_value = strings.RID_FAXWIZARDDIALOG_START_5
  49. self.reschkUseSubject_value = strings.RID_FAXWIZARDDIALOG_START_6
  50. self.reschkUseSalutation_value = strings.RID_FAXWIZARDDIALOG_START_7
  51. self.reschkUseGreeting_value = strings.RID_FAXWIZARDDIALOG_START_8
  52. self.reschkUseFooter_value = strings.RID_FAXWIZARDDIALOG_START_9
  53. self.resoptSenderPlaceholder_value = strings.RID_FAXWIZARDDIALOG_START_10
  54. self.resoptSenderDefine_value = strings.RID_FAXWIZARDDIALOG_START_11
  55. self.restxtTemplateName_value = strings.RID_FAXWIZARDDIALOG_START_12
  56. self.resoptCreateFax_value = strings.RID_FAXWIZARDDIALOG_START_13
  57. self.resoptMakeChanges_value = strings.RID_FAXWIZARDDIALOG_START_14
  58. self.reslblBusinessStyle_value = strings.RID_FAXWIZARDDIALOG_START_15
  59. self.reslblPrivateStyle_value = strings.RID_FAXWIZARDDIALOG_START_16
  60. self.reslblIntroduction_value = strings.RID_FAXWIZARDDIALOG_START_17
  61. self.reslblSenderAddress_value = strings.RID_FAXWIZARDDIALOG_START_18
  62. self.reslblSenderName_value = strings.RID_FAXWIZARDDIALOG_START_19
  63. self.reslblSenderStreet_value = strings.RID_FAXWIZARDDIALOG_START_20
  64. self.reslblPostCodeCity_value = strings.RID_FAXWIZARDDIALOG_START_21
  65. self.reslblFooter_value = strings.RID_FAXWIZARDDIALOG_START_22
  66. self.reslblFinalExplanation1_value = strings.RID_FAXWIZARDDIALOG_START_23
  67. self.reslblFinalExplanation2_value = strings.RID_FAXWIZARDDIALOG_START_24
  68. self.reslblTemplateName_value = strings.RID_FAXWIZARDDIALOG_START_25
  69. self.reslblTemplatePath_value = strings.RID_FAXWIZARDDIALOG_START_26
  70. self.reslblProceed_value = strings.RID_FAXWIZARDDIALOG_START_27
  71. self.reslblTitle1_value = strings.RID_FAXWIZARDDIALOG_START_28
  72. self.reslblTitle3_value = strings.RID_FAXWIZARDDIALOG_START_29
  73. self.reslblTitle4_value = strings.RID_FAXWIZARDDIALOG_START_30
  74. self.reslblTitle5_value = strings.RID_FAXWIZARDDIALOG_START_31
  75. self.reslblTitle6_value = strings.RID_FAXWIZARDDIALOG_START_32
  76. self.reschkFooterNextPages_value = strings.RID_FAXWIZARDDIALOG_START_33
  77. self.reschkFooterPageNumbers_value = strings.RID_FAXWIZARDDIALOG_START_34
  78. self.reschkUseDate_value = strings.RID_FAXWIZARDDIALOG_START_35
  79. self.reschkUseCommunicationType_value = strings.RID_FAXWIZARDDIALOG_START_36
  80. self.resLabel1_value = strings.RID_FAXWIZARDDIALOG_START_37
  81. self.resoptReceiverPlaceholder_value = strings.RID_FAXWIZARDDIALOG_START_38
  82. self.resoptReceiverDatabase_value = strings.RID_FAXWIZARDDIALOG_START_39
  83. self.resLabel2_value = strings.RID_FAXWIZARDDIALOG_START_40
  84. #Create a Dictionary for the constants values.
  85. self.dictConstants = {
  86. "#to#" : strings.RID_FAXWIZARDDIALOG_START_41,
  87. "#from#" : strings.RID_FAXWIZARDDIALOG_START_42,
  88. "#faxconst#" : strings.RID_FAXWIZARDDIALOG_START_43,
  89. "#telconst#" : strings.RID_FAXWIZARDDIALOG_START_44,
  90. "#emailconst#" : strings.RID_FAXWIZARDDIALOG_START_45,
  91. "#consist1#" : strings.RID_FAXWIZARDDIALOG_START_46,
  92. "#consist2#" : strings.RID_FAXWIZARDDIALOG_START_47,
  93. "#consist3#" : strings.RID_FAXWIZARDDIALOG_START_48}
  94. #Create a dictionary for localising the private template
  95. self.dictPrivateTemplate = {
  96. "Bottle" : strings.RID_FAXWIZARDDIALOG_START_49,
  97. "Fax" : strings.RID_FAXWIZARDDIALOG_START_56,
  98. "Lines" : strings.RID_FAXWIZARDDIALOG_START_50,
  99. "Marine" : strings.RID_FAXWIZARDDIALOG_START_51}
  100. #Create a dictionary for localising the business template
  101. self.dictBusinessTemplate = {
  102. "Classic Fax" : strings.RID_FAXWIZARDDIALOG_START_52,
  103. "Classic Fax from Private" : strings.RID_FAXWIZARDDIALOG_START_53,
  104. "Modern Fax" : strings.RID_FAXWIZARDDIALOG_START_54,
  105. "Modern Fax from Private" : strings.RID_FAXWIZARDDIALOG_START_55}
  106. #Common Resources
  107. self.resOverwriteWarning = strings.RID_COMMON_START_19
  108. self.resTemplateDescription = strings.RID_COMMON_START_20
  109. self.RoadmapLabels = []
  110. self.RoadmapLabels.append(strings.RID_FAXWIZARDROADMAP_START_1)
  111. self.RoadmapLabels.append(strings.RID_FAXWIZARDROADMAP_START_2)
  112. self.RoadmapLabels.append(strings.RID_FAXWIZARDROADMAP_START_3)
  113. self.RoadmapLabels.append(strings.RID_FAXWIZARDROADMAP_START_4)
  114. self.RoadmapLabels.append(strings.RID_FAXWIZARDROADMAP_START_5)
  115. self.SalutationLabels = []
  116. self.SalutationLabels.append(strings.RID_FAXWIZARDSALUTATION_START_1)
  117. self.SalutationLabels.append(strings.RID_FAXWIZARDSALUTATION_START_2)
  118. self.SalutationLabels.append(strings.RID_FAXWIZARDSALUTATION_START_3)
  119. self.SalutationLabels.append(strings.RID_FAXWIZARDSALUTATION_START_4)
  120. self.GreetingLabels = []
  121. self.GreetingLabels.append(strings.RID_FAXWIZARDGREETING_START_1)
  122. self.GreetingLabels.append(strings.RID_FAXWIZARDGREETING_START_2)
  123. self.GreetingLabels.append(strings.RID_FAXWIZARDGREETING_START_3)
  124. self.GreetingLabels.append(strings.RID_FAXWIZARDGREETING_START_4)
  125. self.CommunicationLabels = []
  126. self.CommunicationLabels.append(strings.RID_FAXWIZARDCOMMUNICATION_START_1)
  127. self.CommunicationLabels.append(strings.RID_FAXWIZARDCOMMUNICATION_START_2)
  128. self.CommunicationLabels.append(strings.RID_FAXWIZARDCOMMUNICATION_START_3)