Skip to content

Commit

Permalink
Fix djangojs translation
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Dec 9, 2023
1 parent 4397785 commit 6b66561
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 44 deletions.
Binary file modified rdmo/locale/de/LC_MESSAGES/djangojs.mo
Binary file not shown.
88 changes: 50 additions & 38 deletions rdmo/locale/de/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: RDMO\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-04 13:03+0100\n"
"POT-Creation-Date: 2023-12-08 18:06+0100\n"
"PO-Revision-Date: 2023-12-04 12:54+0100\n"
"Last-Translator: Jochen Klar <[email protected]>\n"
"Language-Team: RDMO <[email protected]>\n"
Expand Down Expand Up @@ -138,20 +138,28 @@ msgstr ""
"Dieses Attribut wird der Bedingung <code class=\"code-conditions\">%s</code> "
"hinzugefügt."

#: management/assets/js/components/edit/EditCatalog.js:42
#: management/assets/js/components/edit/EditCatalog.js:39
msgid "Add existing section"
msgstr "Existierenden Abschnitt hinzufügen"

#: management/assets/js/components/edit/EditCatalog.js:40
msgid "Create new section"
msgstr "Neuen Abschnitt erstellen"

#: management/assets/js/components/edit/EditCatalog.js:46
#: management/assets/js/components/element/Catalog.js:35
msgid "This catalog is read only"
msgstr "Dieser Katalog ist schreibgeschützt"

#: management/assets/js/components/edit/EditCatalog.js:49
#: management/assets/js/components/edit/EditCatalog.js:53
#: management/assets/js/components/element/Catalog.js:51
#: management/assets/js/components/import/ImportCatalog.js:30
#: management/assets/js/constants/elements.js:44
#: management/static/management/js/management.js:2
msgid "Catalog"
msgstr "Katalog"

#: management/assets/js/components/edit/EditCatalog.js:51
#: management/assets/js/components/edit/EditCatalog.js:55
msgid "Create catalog"
msgstr "Neuen Katalog erstellen"

Expand Down Expand Up @@ -301,24 +309,41 @@ msgstr "Frage: %s"
msgid "Question set: %s"
msgstr "Fragenset: %s"

#: management/assets/js/components/edit/EditPage.js:75
#: management/assets/js/components/edit/EditPage.js:72
#: management/assets/js/components/edit/EditQuestionSet.js:72
#, fuzzy
#| msgid "Add existing element"
msgid "Add existing element"
msgstr "Existierendes Element hinzufügen"

#: management/assets/js/components/edit/EditPage.js:73
#: management/assets/js/components/edit/EditQuestionSet.js:73
msgid "Create new question set"
msgstr "Neues Fragenset erstellen"

#: management/assets/js/components/edit/EditPage.js:74
#: management/assets/js/components/edit/EditQuestionSet.js:74
msgid "Create new question"
msgstr "Neue Frage erstellen"

#: management/assets/js/components/edit/EditPage.js:80
#: management/assets/js/components/element/Page.js:42
msgid "This page is read only"
msgstr "Diese Seite ist schreibgeschützt"

#: management/assets/js/components/edit/EditPage.js:82
#: management/assets/js/components/edit/EditPage.js:87
#: management/assets/js/components/element/Page.js:57
#: management/assets/js/components/import/ImportPage.js:28
#: management/assets/js/constants/elements.js:46
#: management/static/management/js/management.js:2
msgid "Page"
msgstr "Seite"

#: management/assets/js/components/edit/EditPage.js:84
#: management/assets/js/components/edit/EditPage.js:89
msgid "Create page"
msgstr "Seite erstellen"

#: management/assets/js/components/edit/EditPage.js:91
#: management/assets/js/components/edit/EditPage.js:96
#, javascript-format
msgid ""
"This page will be added to the section <code class=\"code-questions\">%s</"
Expand Down Expand Up @@ -362,24 +387,24 @@ msgstr ""
"Diese Frage wird dem Fragenset <code class=\"code-questions\">%s</code> "
"hinzugefügt."

#: management/assets/js/components/edit/EditQuestionSet.js:75
#: management/assets/js/components/edit/EditQuestionSet.js:80
#: management/assets/js/components/element/QuestionSet.js:41
msgid "This question set is read only"
msgstr "Dieses Fragenset ist schreibgeschützt"

#: management/assets/js/components/edit/EditQuestionSet.js:82
#: management/assets/js/components/edit/EditQuestionSet.js:87
#: management/assets/js/components/element/QuestionSet.js:56
#: management/assets/js/components/import/ImportQuestionSet.js:28
#: management/assets/js/constants/elements.js:47
#: management/static/management/js/management.js:2
msgid "Question set"
msgstr "Fragenset"

#: management/assets/js/components/edit/EditQuestionSet.js:84
#: management/assets/js/components/edit/EditQuestionSet.js:89
msgid "Create question set"
msgstr "Fragenset erstellen"

#: management/assets/js/components/edit/EditQuestionSet.js:91
#: management/assets/js/components/edit/EditQuestionSet.js:96
#, javascript-format
msgid ""
"This question set will be added to the page <code class=\"code-questions\">"
Expand All @@ -388,7 +413,7 @@ msgstr ""
"Dieser Fragenset wird der Seite <code class=\"code-questions\">%s</code> "
"hinzugefügt."

#: management/assets/js/components/edit/EditQuestionSet.js:98
#: management/assets/js/components/edit/EditQuestionSet.js:103
#, javascript-format
msgid ""
"This question set will be added to the question set <code class=\"code-"
Expand All @@ -397,24 +422,32 @@ msgstr ""
"Dieser Fragensatz wird dem Fragenset <code class=\"code-questions\">%s</"
"code> hinzugefügt."

#: management/assets/js/components/edit/EditSection.js:41
#: management/assets/js/components/edit/EditSection.js:38
msgid "Add existing page"
msgstr "Existierende Seite hinzufügen"

#: management/assets/js/components/edit/EditSection.js:39
msgid "Create new page"
msgstr "Neues Seite erstellen"

#: management/assets/js/components/edit/EditSection.js:45
#: management/assets/js/components/element/Section.js:39
msgid "This section is read only"
msgstr "Dieser Abschnitt ist schreibgeschützt"

#: management/assets/js/components/edit/EditSection.js:48
#: management/assets/js/components/edit/EditSection.js:52
#: management/assets/js/components/element/Section.js:54
#: management/assets/js/components/import/ImportSection.js:28
#: management/assets/js/constants/elements.js:45
#: management/static/management/js/management.js:2
msgid "Section"
msgstr "Abschnitt"

#: management/assets/js/components/edit/EditSection.js:50
#: management/assets/js/components/edit/EditSection.js:54
msgid "Create section"
msgstr "Neuen Abschnitt erstellen"

#: management/assets/js/components/edit/EditSection.js:57
#: management/assets/js/components/edit/EditSection.js:61
#, javascript-format
msgid ""
"This section will be added to the catalog <code class=\"code-questions\">%s</"
Expand Down Expand Up @@ -1325,24 +1358,3 @@ msgstr "Alle abwählen"
#: management/assets/js/components/sidebar/ImportSidebar.js:75
msgid "Set URI prefix for all elements"
msgstr "URI-Präfix für alle Elemente festlegen"

msgid "Add existing page"
msgstr "Existierende Seite hinzufügen"

msgid "Create new page"
msgstr "Neues Seite erstellen"

msgid "Add existing section"
msgstr "Existierenden Abschnitt hinzufügen"

msgid "Create new section"
msgstr "Neuen Abschnitt erstellen"

msgid "Add existing element"
msgstr "Existierendes Element hinzufügen"

msgid "Create new question"
msgstr "Neue Frage erstellen"

msgid "Create new question set"
msgstr "Neues Fragenset erstellen"
6 changes: 5 additions & 1 deletion rdmo/management/assets/js/components/edit/EditCatalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ const EditCatalog = ({ config, catalog, elements, elementActions }) => {

const info = <CatalogInfo catalog={catalog} elements={elements} />

// for reasons unknown, the strings are not picked up by makemessages from the props
const addSectionText = gettext('Add existing section')
const createSectionText = gettext('Create new section')

return (
<div className="panel panel-default panel-edit">
<div className="panel-heading">
Expand Down Expand Up @@ -96,7 +100,7 @@ const EditCatalog = ({ config, catalog, elements, elementActions }) => {
</Tabs>

<OrderedMultiSelect config={config} element={catalog} field="sections" options={sections}
addText={gettext('Add existing section')} createText={gettext('Create new section')}
addText={addSectionText} createText={createSectionText}
onChange={updateCatalog} onCreate={createSection} onEdit={editSection} />

{get(config, 'settings.groups') && <Select config={config} element={catalog} field="groups"
Expand Down
11 changes: 9 additions & 2 deletions rdmo/management/assets/js/components/edit/EditPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ const EditPage = ({ config, page, elements, elementActions }) => {

const info = <PageInfo page={page} elements={elements} elementActions={elementActions} />

// for reasons unknown, the strings are not picked up by makemessages from the props
const addElementText = gettext('Add existing element')
const createQuestionText = gettext('Create new question set')
const createQuestionSetText = gettext('Create new question')

return (
<div className="panel panel-default panel-edit">
<div className="panel-heading">
Expand Down Expand Up @@ -140,13 +145,15 @@ const EditPage = ({ config, page, elements, elementActions }) => {
}
</Tabs>



<Select config={config} element={page} field="attribute" createText={gettext('Create new attribute')}
options={attributes} onChange={updatePage} onCreate={createAttribute} onEdit={editAttribute} />

<OrderedMultiSelect config={config} element={page} field="elements"
values={elementValues} options={elementOptions}
addText={gettext('Add existing element')} createText={gettext('Create new question')}
altCreateText={gettext('Create new question set')}
addText={addElementText} createText={createQuestionText}
altCreateText={createQuestionSetText}
onChange={updatePage} onCreate={createQuestion} onAltCreate={createQuestionSet}
onEdit={editElement} />

Expand Down
9 changes: 7 additions & 2 deletions rdmo/management/assets/js/components/edit/EditQuestionSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ const EditQuestionSet = ({ config, questionset, elements, elementActions }) => {

const info = <QuestionSetInfo questionset={questionset} elements={elements} elementActions={elementActions} />

// for reasons unknown, the strings are not picked up by makemessages from the props
const addElementText = gettext('Add existing element')
const createQuestionText = gettext('Create new question set')
const createQuestionSetText = gettext('Create new question')

return (
<div className="panel panel-default panel-edit">
<div className="panel-heading">
Expand Down Expand Up @@ -152,8 +157,8 @@ const EditQuestionSet = ({ config, questionset, elements, elementActions }) => {

<OrderedMultiSelect config={config} element={questionset} field="elements"
values={elementValues} options={elementOptions}
addText={gettext('Add existing element')} createText={gettext('Create new question')}
altCreateText={gettext('Create new question set')}
addText={addElementText} createText={createQuestionText}
altCreateText={createQuestionSetText}
onChange={updateQuestionSet} onCreate={createQuestion} onAltCreate={createQuestionSet}
onEdit={editElement}/>

Expand Down
6 changes: 5 additions & 1 deletion rdmo/management/assets/js/components/edit/EditSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ const EditSection = ({ config, section, elements, elementActions }) => {

const info = <SectionInfo section={section} elements={elements} elementActions={elementActions} />

// for reasons unknown, the strings are not picked up by makemessages from the props
const addPageText = gettext('Add existing page')
const createPageText = gettext('Create new page')

return (
<div className="panel panel-default panel-edit">
<div className="panel-heading">
Expand Down Expand Up @@ -95,7 +99,7 @@ const EditSection = ({ config, section, elements, elementActions }) => {
</Tabs>

<OrderedMultiSelect config={config} element={section} field="pages" options={pages}
addText={gettext('Add existing page')} createText={gettext('Create new page')}
addText={addPageText} createText={createPageText}
onChange={updateSection} onCreate={createPage} onEdit={editPage} />

{get(config, 'settings.multisite') && <Select config={config} element={section} field="editors"
Expand Down

0 comments on commit 6b66561

Please sign in to comment.