1 package com.atlassian.plugins.codegen.modules.confluence.blueprint;
2
3
4
5
6
7
8 public enum BlueprintI18nProperty
9 {
10 WIZARD_FORM_TITLE_FIELD_LABEL("wizard.page0.title.label", "Page title"),
11 WIZARD_FORM_TITLE_FIELD_PLACEHOLDER("wizard.page0.title.placeholder", "Add a title for your new page"),
12 WIZARD_FORM_TITLE_FIELD_ERROR("wizard.page0.title.error", "You must enter a title"),
13 WIZARD_FORM_JSVAR_FIELD_LABEL("wizard.page0.jsvar.label", "Wizard input"),
14 WIZARD_FORM_JSVAR_FIELD_PLACEHOLDER("wizard.page0.jsvar.placeholder", "Type some text here for the page"),
15 WIZARD_FORM_PRE_RENDER_TEXT("wizard.page0.pre-render", "This text comes from the pre-render hook in the Wizard JavaScript"),
16 WIZARD_FORM_POST_RENDER_TEXT("wizard.page0.post-render", "This text comes from the post-render hook in the Wizard JavaScript"),
17 WIZARD_FORM_FIELD_REQUIRED("wizard.required", "required"),
18 HOW_TO_USE_HEADING("wizard.how-to-use.heading", "Welcome to my Blueprint"),
19 HOW_TO_USE_CONTENT("wizard.how-to-use.content", "This blueprint can be used to create a special page."),
20 CONTENT_TEMPLATE_PLACEHOLDER("template.placeholder", "Type here to replace this text"),
21 CONTENT_TEMPLATE_MENTION_PLACEHOLDER("template.placeholder", "Type here to replace this text")
22 ;
23
24 private final String placeholder;
25 private final String i18nSuffix;
26 private final String i18nValue;
27
28 BlueprintI18nProperty(String i18nSuffix, String i18nValue)
29 {
30 this.placeholder = this.name();
31 this.i18nSuffix = i18nSuffix;
32 this.i18nValue = i18nValue;
33 }
34
35 public String getPropertyKey()
36 {
37 return placeholder;
38 }
39
40 public String getI18nKey(BlueprintStringer stringer)
41 {
42 return stringer.makeI18nKey(i18nSuffix);
43 }
44
45 public String getI18nValue()
46 {
47 return i18nValue;
48 }
49 }