Последняя версия с сервера прошлого разработчика

This commit is contained in:
2025-07-10 04:35:51 +00:00
commit c731570032
1174 changed files with 134314 additions and 0 deletions

44
nova/resources/js/mixins/Localization.js vendored Executable file
View File

@@ -0,0 +1,44 @@
export default {
methods: {
/**
* Translate the given key.
*/
__(key, replace) {
var translation = window.config.translations[key]
? window.config.translations[key]
: key
_.forEach(replace, (value, key) => {
key = new String(key)
if (value === null) {
console.error(
`Translation '${translation}' for key '${key}' contains a null replacement.`
)
return
}
value = new String(value)
const searches = [
':' + key,
':' + key.toUpperCase(),
':' + key.charAt(0).toUpperCase() + key.slice(1),
]
const replacements = [
value,
value.toUpperCase(),
value.charAt(0).toUpperCase() + value.slice(1),
]
for (var i = searches.length - 1; i >= 0; i--) {
translation = translation.replace(searches[i], replacements[i])
}
})
return translation
},
},
}