mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 01:00:50 -04:00
Merge pull request #40411 from nextcloud/artonge/fix/translation
Use t and n for translation
This commit is contained in:
commit
801476295e
12 changed files with 26 additions and 24 deletions
|
|
@ -70,7 +70,7 @@
|
|||
import type { PropType } from 'vue'
|
||||
import type { Node } from '@nextcloud/files'
|
||||
|
||||
import { translate, translatePlural } from '@nextcloud/l10n'
|
||||
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
|
||||
import { getFileListHeaders, Folder, View } from '@nextcloud/files'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
import Vue from 'vue'
|
||||
|
|
@ -132,14 +132,14 @@ export default Vue.extend({
|
|||
|
||||
summaryFile() {
|
||||
const count = this.files.length
|
||||
return translatePlural('files', '{count} file', '{count} files', count, { count })
|
||||
return n('files', '{count} file', '{count} files', count, { count })
|
||||
},
|
||||
summaryFolder() {
|
||||
const count = this.nodes.length - this.files.length
|
||||
return translatePlural('files', '{count} folder', '{count} folders', count, { count })
|
||||
return n('files', '{count} folder', '{count} folders', count, { count })
|
||||
},
|
||||
summary() {
|
||||
return translate('files', '{summaryFile} and {summaryFolder}', this)
|
||||
return t('files', '{summaryFile} and {summaryFolder}', this)
|
||||
},
|
||||
isMtimeAvailable() {
|
||||
// Hide mtime column on narrow screens
|
||||
|
|
@ -192,7 +192,7 @@ export default Vue.extend({
|
|||
return node.fileid
|
||||
},
|
||||
|
||||
t: translate,
|
||||
t,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
|
|||
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
|
||||
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js'
|
||||
import moment from '@nextcloud/moment'
|
||||
import { translate } from '@nextcloud/l10n'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
import { joinPaths } from '@nextcloud/paths'
|
||||
import { getRootUrl } from '@nextcloud/router'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
|
|
@ -226,14 +226,14 @@ export default {
|
|||
|
||||
if (this.isCurrent) {
|
||||
if (label === '') {
|
||||
return translate('files_versions', 'Current version')
|
||||
return t('files_versions', 'Current version')
|
||||
} else {
|
||||
return `${label} (${translate('files_versions', 'Current version')})`
|
||||
return `${label} (${t('files_versions', 'Current version')})`
|
||||
}
|
||||
}
|
||||
|
||||
if (this.isFirstVersion && label === '') {
|
||||
return translate('files_versions', 'Initial version')
|
||||
return t('files_versions', 'Initial version')
|
||||
}
|
||||
|
||||
return label
|
||||
|
|
@ -301,6 +301,8 @@ export default {
|
|||
}
|
||||
this.$emit('compare', { version: this.version })
|
||||
},
|
||||
|
||||
t,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
4
dist/614-614.js
vendored
4
dist/614-614.js
vendored
File diff suppressed because one or more lines are too long
2
dist/614-614.js.map
vendored
2
dist/614-614.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-unsupported-browser.js
vendored
4
dist/core-unsupported-browser.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-unsupported-browser.js.map
vendored
2
dist/core-unsupported-browser.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_versions-files_versions.js
vendored
4
dist/files_versions-files_versions.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_versions-files_versions.js.map
vendored
2
dist/files_versions-files_versions.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/weather_status-weather-status.js
vendored
4
dist/weather_status-weather-status.js
vendored
File diff suppressed because one or more lines are too long
2
dist/weather_status-weather-status.js.map
vendored
2
dist/weather_status-weather-status.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue