Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/OC/l10n.js')
-rw-r--r--core/src/OC/l10n.js34
1 files changed, 18 insertions, 16 deletions
diff --git a/core/src/OC/l10n.js b/core/src/OC/l10n.js
index 0704269ce4b..48dfe6c1785 100644
--- a/core/src/OC/l10n.js
+++ b/core/src/OC/l10n.js
@@ -1,7 +1,7 @@
/**
* Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>
- * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
- * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Daniel Kesselberg <mail@danielkesselberg.de>
@@ -54,10 +54,10 @@ const L10n = {
/**
* Load an app's translation bundle if not loaded already.
*
- * @param {String} appName name of the app
+ * @param {string} appName name of the app
* @param {Function} callback callback to be called when
* the translations are loaded
- * @returns {Promise} promise
+ * @return {Promise} promise
*/
load(appName, callback) {
// already available ?
@@ -86,28 +86,29 @@ const L10n = {
/**
* Register an app's translation bundle.
*
- * @param {String} appName name of the app
- * @param {Object<String,String>} bundle bundle
+ * @param {string} appName name of the app
+ * @param {object<string, string>} bundle bundle
*/
register(appName, bundle) {
registerAppTranslations(appName, bundle, this._getPlural)
},
/**
- * @private do not use this
+ * @private
*/
_unregister: unregisterAppTranslations,
/**
* Translate a string
+ *
* @param {string} app the id of the app for which to translate the string
* @param {string} text the string to translate
- * @param {Object} [vars] map of placeholder key to value
+ * @param {object} [vars] map of placeholder key to value
* @param {number} [count] number to replace %n with
- * @param {array} [options] options array
+ * @param {Array} [options] options array
* @param {bool} [options.escape=true] enable/disable auto escape of placeholders (by default enabled)
* @param {bool} [options.sanitize=true] enable/disable sanitization (by default enabled)
- * @returns {string}
+ * @return {string}
*/
translate(app, text, vars, count, options) {
const defaultOptions = {
@@ -151,14 +152,15 @@ const L10n = {
/**
* Translate a plural string
+ *
* @param {string} app the id of the app for which to translate the string
* @param {string} textSingular the string to translate for exactly one object
* @param {string} textPlural the string to translate for n objects
* @param {number} count number to determine whether to use singular or plural
- * @param {Object} [vars] map of placeholder key to value
- * @param {array} [options] options array
+ * @param {object} [vars] map of placeholder key to value
+ * @param {Array} [options] options array
* @param {bool} [options.escape=true] enable/disable auto escape of placeholders (by default enabled)
- * @returns {string} Translated string
+ * @return {string} Translated string
*/
translatePlural(app, textSingular, textPlural, count, vars, options) {
const identifier = '_' + textSingular + '_::_' + textPlural + '_'
@@ -183,7 +185,7 @@ const L10n = {
* The plural function taken from symfony
*
* @param {number} number the number of elements
- * @returns {number}
+ * @return {number}
* @private
*/
_getPlural(number) {
@@ -346,14 +348,14 @@ export default L10n
/**
* Returns the user's locale
*
- * @returns {String} locale string
+ * @return {string} locale string
*/
export const getLocale = () => $('html').data('locale') ?? 'en'
/**
* Returns the user's language
*
- * @returns {String} language string
+ * @return {string} language string
*/
export const getLanguage = () => $('html').prop('lang')