summaryrefslogtreecommitdiffstats
path: root/lib/private/L10N
Commit message (Collapse)AuthorAgeFilesLines
* Fix translations with trailing colonsJoas Schilling2022-04-261-1/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove createPluralFunction which is replaced by Symfony\Translations libJoas Schilling2022-01-241-65/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Default to language from request in L10N\Factory->getUserLanguage()Jonas Meurer2022-01-101-0/+9
| | | | | | | | | | | | | | Try to get the language from request before falling back to the instance default. This fixes the detected user language during first login of a new user and ensures that the returned language is consistent during the login. Also partially fixes a bug with Collectives folder being initialized in different languages at first login, see https://gitlab.com/collectivecloud/collectives/-/issues/238 Signed-off-by: Jonas Meurer <jonas@freesources.org>
* Fix Iterator return typesCôme Chilliet2021-11-231-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix ArrayAccess and JsonSerializable return typesCôme Chilliet2021-11-231-5/+1
| | | | | | First round of modifications for PHP 8.1 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add new account propertiesChristopher Ng2021-10-191-20/+24
| | | | | | | | | | | | | | - New properties - Organisation - Role - Headline - Biography - Profile Enabled property - Fix errors with building default account properties - Fix L10N factory method `getLanguage` not public error - Update tests Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Add L10n factory method for generic language heuristicsChristoph Wurst2021-10-131-21/+59
| | | | | | | | | | | The existing `findLanguage` method tries its best to find the best language for the current users. For some tasks we don't want this but rather determine the most generic language for *another* user, e.g. when the current user trigger an email notifiaction to someone else. In this case the current user's language is a bad guess in many multi-language environments. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Provide initial stateChristopher Ng2021-08-271-7/+7
| | | | | | - camelCase language strings Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-046-14/+5
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix PHP CSJoas Schilling2021-04-201-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Correctly replace all PHP placeholders with the parametersJoas Schilling2021-04-201-5/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix languages that miss a string in the translationJoas Schilling2021-04-201-7/+16
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a check for the pipe characterJoas Schilling2021-04-201-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* "Symfony\Component\Translation\PluralizationRules" is deprecatedJoas Schilling2021-04-202-40/+23
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-1/+1
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unneeded casts that were found by PsalmMorris Jobke2021-01-111-3/+3
| | | | | | In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521) Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Move localecache to arrayRoeland Jago Douma2020-11-021-7/+5
| | | | | | | | It seems the DS Set in the polyfill implementation is a lot less efficient than normal arrays. (A LOT!). So for now use a stupid normal array. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Only parse the locales onesRoeland Jago Douma2020-10-311-5/+14
| | | | | | | | | | | | Before we'd go over the entire list for each translation (so each app) we'd use translation for. This means we'd also go over thise locale list (currently containing 750 entries) * apps so often this added up to ~20k calls. now we just dump the locales in a set once and then check if the entry is there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add a dedicated method to get the language for another userJoas Schilling2020-07-011-0/+23
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix languages empty arrayGretaD2020-05-081-2/+11
| | | | Signed-off-by: GretaD <gretadoci@gmail.com>
* Update license headers for 19Christoph Wurst2020-04-293-0/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code according to PSR2Christoph Wurst2020-04-101-0/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-105-17/+13
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-102-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-6/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-092-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-312-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-9/+9
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-056-7/+19
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-0/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move settings to an appChristoph Wurst2019-09-281-2/+1
| | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
* Make the L10N loading lazyRoeland Jago Douma2019-05-222-25/+98
| | | | | | | | | Fixes #15675 This makes loading of the actual L10N lazy. So we only detect and load the actual translations when they are used. Instead of trying to load them all the time just because an app is enabled. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* TypehintJohn Molakvoæ (skjnldsv)2018-09-101-2/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Use user locale as default in the templateJohn Molakvoæ (skjnldsv)2018-09-101-0/+20
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Backend work to provide NC whats New info to usersArthur Schiwon2018-07-052-28/+143
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* adjust backend and gui to update and changelog serverArthur Schiwon2018-06-291-0/+32
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* docblock version fixesGeorg Ehrke2018-06-281-1/+1
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* move locales file to /resources/Georg Ehrke2018-06-272-437/+1
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* fix use of findLocaleGeorg Ehrke2018-06-271-1/+1
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* properly handle force_locale settingGeorg Ehrke2018-06-271-0/+5
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* cache available locales to minimize fs accessGeorg Ehrke2018-06-271-6/+23
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* OC.getLocale() now returns Locale and no longer LanguageThomas Citharel2018-06-271-1/+1
| | | | | | | Added OC.getLanguage() to get Language <html lang=''> still gets language, though according to IETF BCP47 locale should be good. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* handle config.php valuesThomas Citharel2018-06-271-5/+10
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* Fix review & testsThomas Citharel2018-06-272-0/+496
| | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Allow apps to specify locale for localisationThomas Citharel2018-06-272-13/+31
| | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Merge pull request #9435 from nextcloud/bugfix/noid/fix_force_language_html_attrRoeland Jago Douma2018-05-231-0/+5
|\ | | | | make sure force language is reflected in html lang attribute
| * Always set the request language to the force languageRoeland Jago Douma2018-05-231-6/+5
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
| * make sure force language is reflected in html lang attributeGeorg Ehrke2018-05-221-0/+6
| | | | | | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>