Skip to content

Commit bb497a3

Browse files
authored
Added translations for German (#27)
* Update dependencies and Volto package version Removed `react-intl` from peerDependencies in `volto-code-block`. Updated Volto package to version `18.0.0-alpha.41` in `mrs.developer.json`. I made these changes because the translations did not work without this change for some inexplicable reason * Add and update translations for volto-code-block locales * Update German translation for "Starting Line Number"
1 parent e91de9d commit bb497a3

File tree

8 files changed

+110
-6
lines changed

8 files changed

+110
-6
lines changed

mrs.developer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"package": "@plone/volto",
55
"url": "[email protected]:plone/volto.git",
66
"https": "https://github.com/plone/volto.git",
7-
"tag": "18.0.0-alpha.25"
7+
"tag": "18.0.0-alpha.41"
88
}
99
}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
msgid ""
2+
msgstr ""
3+
"Project-Id-Version: \n"
4+
"Report-Msgid-Bugs-To: \n"
5+
"POT-Creation-Date: \n"
6+
"PO-Revision-Date: \n"
7+
"Last-Translator: \n"
8+
"Language: \n"
9+
"Language-Team: \n"
10+
"Content-Type: \n"
11+
"Content-Transfer-Encoding: \n"
12+
"Plural-Forms: \n"
13+
14+
#. Default: "Caption"
15+
#: components/Blocks/Code/schema
16+
msgid "Caption"
17+
msgstr "Beschriftung"
18+
19+
#. Default: "Code Block"
20+
#: components/Blocks/Code/schema
21+
msgid "Code Block"
22+
msgstr ""
23+
24+
#. Default: "Dark"
25+
#: components/SyntaxHighlighter/Styles
26+
msgid "Dark"
27+
msgstr "Dunkel"
28+
29+
#. Default: "Description"
30+
#: components/Blocks/Code/schema
31+
#: components/Blocks/Gist/schema
32+
msgid "Description"
33+
msgstr "Beschreibung"
34+
35+
#. Default: "File"
36+
#: components/Blocks/Gist/schema
37+
msgid "File"
38+
msgstr "Datei"
39+
40+
#. Default: "Gist Block"
41+
#: components/Blocks/Gist/schema
42+
msgid "Gist Block"
43+
msgstr ""
44+
45+
#. Default: "Gist Id"
46+
#: components/Blocks/Gist/schema
47+
msgid "Gist Id"
48+
msgstr ""
49+
50+
#. Default: "Language"
51+
#: components/Blocks/Code/schema
52+
msgid "Language"
53+
msgstr "Sprache"
54+
55+
#. Default: "Light"
56+
#: components/SyntaxHighlighter/Styles
57+
msgid "Light"
58+
msgstr "Hell"
59+
60+
#. Default: "Show Line Numbers"
61+
#: components/Blocks/Code/schema
62+
msgid "Show Line Numbers"
63+
msgstr "Zeilennummern anzeigen"
64+
65+
#. Default: "Starting Line Number"
66+
#: components/Blocks/Code/schema
67+
msgid "Starting Line Number"
68+
msgstr "Nummer der Startzeile"
69+
70+
#. Default: "Style"
71+
#: components/Blocks/Code/schema
72+
msgid "Style"
73+
msgstr "Aussehen"
74+
75+
#. Default: "Title"
76+
#: components/Blocks/Code/schema
77+
#: components/Blocks/Gist/schema
78+
msgid "Title"
79+
msgstr "Titel"
80+
81+
#. Default: "Wrap Long Lines"
82+
#: components/Blocks/Code/schema
83+
msgid "Wrap Long Lines"
84+
msgstr "Lange Zeilen umbrechen"

packages/volto-code-block/locales/en/LC_MESSAGES/volto.po

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ msgstr ""
1111
"Content-Transfer-Encoding: \n"
1212
"Plural-Forms: \n"
1313

14+
#. Default: "Caption"
15+
#: components/Blocks/Code/schema
16+
msgid "Caption"
17+
msgstr ""
18+
1419
#. Default: "Code Block"
1520
#: components/Blocks/Code/schema
1621
msgid "Code Block"

packages/volto-code-block/locales/pt_BR/LC_MESSAGES/volto.po

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ msgstr ""
1111
"Content-Transfer-Encoding: \n"
1212
"Plural-Forms: \n"
1313

14+
#. Default: "Caption"
15+
#: components/Blocks/Code/schema
16+
msgid "Caption"
17+
msgstr ""
18+
1419
#. Default: "Code Block"
1520
#: components/Blocks/Code/schema
1621
msgid "Code Block"

packages/volto-code-block/locales/volto.pot

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: Plone\n"
4-
"POT-Creation-Date: 2024-04-02T13:25:29.270Z\n"
4+
"POT-Creation-Date: 2025-01-15T13:59:29.248Z\n"
55
"Last-Translator: Plone i18n <[email protected]>\n"
66
"Language-Team: Plone i18n <[email protected]>\n"
77
"Content-Type: text/plain; charset=utf-8\n"
@@ -13,6 +13,11 @@ msgstr ""
1313
"Preferred-Encodings: utf-8\n"
1414
"Domain: volto\n"
1515

16+
#. Default: "Caption"
17+
#: components/Blocks/Code/schema
18+
msgid "Caption"
19+
msgstr ""
20+
1621
#. Default: "Code Block"
1722
#: components/Blocks/Code/schema
1823
msgid "Code Block"

packages/volto-code-block/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
},
3636
"peerDependencies": {
3737
"react": "18.2.0",
38-
"react-dom": "18.2.0",
39-
"react-intl": "3.8.0"
38+
"react-dom": "18.2.0"
4039
},
4140
"devDependencies": {
4241
"@plone/scripts": "^3.6.1",

packages/volto-code-block/src/components/Blocks/Code/schema.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ const messages = defineMessages({
3535
id: 'Description',
3636
defaultMessage: 'Description',
3737
},
38+
caption: {
39+
id: 'Caption',
40+
defaultMessage: 'Caption',
41+
},
3842
});
3943

4044
export const codeSchema = (props) => {
@@ -73,7 +77,7 @@ export const codeSchema = (props) => {
7377
},
7478
{
7579
id: 'caption',
76-
title: 'Caption',
80+
title: props.intl.formatMessage(messages.caption),
7781
fields: ['caption_title', 'caption_description'],
7882
},
7983
],

packages/volto-code-block/src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ const applyConfig = (config) => {
130130
);
131131
}
132132
});
133-
133+
config.settings.isMultilingual = true;
134+
config.settings.supportedLanguages = ['de', 'en'];
135+
config.settings.defaultLanguage = 'de';
134136
return config;
135137
};
136138

0 commit comments

Comments
 (0)