Skip to content

Commit

Permalink
Fix translation extraction
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Rittershofer <[email protected]>
  • Loading branch information
jotoeri committed Mar 27, 2021
1 parent d5f3698 commit ec733aa
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build/extract-l10n.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ extractor
}),
JsExtractors.callExpression('n', {
arguments: {
text: 1,
textPlural: 2,
text: 0,
textPlural: 1,
}
}),
])
Expand Down
6 changes: 6 additions & 0 deletions l10n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ msgstr ""
msgid "Custom"
msgstr ""

msgid "External documentation for {title}"
msgstr ""

msgid "Flags"
msgstr ""

Expand Down Expand Up @@ -83,6 +86,9 @@ msgstr ""
msgid "Start slideshow"
msgstr ""

msgid "Submit"
msgstr ""

msgid "Symbols"
msgstr ""

Expand Down
3 changes: 2 additions & 1 deletion src/components/AppSidebar/AppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
class="app-sidebar-header">
<!-- close sidebar button -->
<a
v-tooltip.auto="t('close')"
v-tooltip.auto="closeTranslated"
href="#"
class="app-sidebar__close icon-close"
@click.prevent="closeSidebar" />
Expand Down Expand Up @@ -365,6 +365,7 @@ export default {

data() {
return {
closeTranslated: t('Close'),
isStarred: this.starred,
}
},
Expand Down
9 changes: 8 additions & 1 deletion src/components/SettingsInputText/SettingsInputText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
@input="onInput"
@change="onChange">
<input :id="idSubmit"
:value="t('Submit')"
:value="submitTranslated"
type="submit"
class="action-input__submit">
<label v-show="!disabled" :for="idSubmit" class="action-input__label" />
Expand Down Expand Up @@ -90,6 +90,13 @@ export default {
validator: id => id.trim() !== '',
},
},

data() {
return {
submitTranslated: t('Submit'),
}
},

computed: {
/**
* @returns {string}
Expand Down
10 changes: 9 additions & 1 deletion src/components/SettingsSection/SettingsSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This component is to be used in the settings section of nextcloud.
:href="docUrl"
class="settings-section__info"
role=""
:title="t('External documentation for {title}', {title})" />
:title="docTitleTranslated" />
</h2>
<p v-if="hasDescription"
class="settings-section__desc">
Expand Down Expand Up @@ -82,6 +82,14 @@ export default {
},
},

data() {
return {
docTitleTranslated: t('External documentation for {title}', {
title: this.title,
}),
}
},

computed: {
hasDescription() {
return this.description.length > 0
Expand Down

0 comments on commit ec733aa

Please sign in to comment.