aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/L10N
Commit message (Collapse)AuthorAgeFilesLines
* fix(l10n): Fix list of RTL languagesbugfix/noid/fix-rtl-language-listJoas Schilling2024-09-271-1/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(rtl): Make clear that the direction is based on languagefeat/31420/bidi-backend-supportJoas Schilling2024-09-231-3/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(rtl): Fix list of RTL languagesJoas Schilling2024-09-231-5/+11
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat(rtl): Set layout direction based on languageali ghorbani2024-09-231-0/+16
| | | | Signed-off-by: ali ghorbani <ghorbani.ali.developer@gmail.com>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore: Migrate cleanAppId and getAppPath calls to IAppManager from OC_AppCôme Chilliet2024-09-131-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-10/+10
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* feat: reduce available languages per config value "reduce_to_languages"Misha M.-Kupriyanov2024-07-011-0/+4
| | | | | | | | | | | | Example: restrict to en, de, es, fr, it' languages ./occ config:system:set reduce_to_languages 0 --value en ./occ config:system:set reduce_to_languages 1 --value de ./occ config:system:set reduce_to_languages 2 --value es ./occ config:system:set reduce_to_languages 3 --value fr ./occ config:system:set reduce_to_languages 4 --value it Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-246-140/+16
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Fix tests following OC_App migrations to IAppManagerCôme Chilliet2024-04-221-3/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Migrate a few more classes away from OC_App::getAppPathCôme Chilliet2024-04-221-33/+15
| | | | | | Also fixed AppTest Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-022-9/+9
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: Migrate away from OC::$server->getLoggerCôme Chilliet2024-02-131-1/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update lib/private/L10N/Factory.phpc39cfbb32023-10-181-1/+1
| | | | Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: c39cfbb3 <145777845+c39cfbb3@users.noreply.github.com>
* L10N/Factory: Support "Accept-Language: zh-Hans-CN" and alikec39cfbb32023-10-181-0/+4
| | | Signed-off-by: c39cfbb3 <145777845+c39cfbb3@users.noreply.github.com>
* Refactor "substr" calls to improve code readabilityHamid Dehnavi2023-07-071-2/+2
| | | | Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
* fix(l10n): Fix plural issue with different locale and languageJoas Schilling2023-06-211-1/+6
| | | | | | | | | | We need to use the language code here instead of the locale, because Symfony does not distinguish between the two and would otherwise e.g. with locale "Czech" and language "German" try to pick a non-existing plural rule, because Czech has 4 plural forms and German only 2. Signed-off-by: Joas Schilling <coding@schilljs.com>
* Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-152-4/+4
| | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* Adapt tests to config value typingCôme Chilliet2023-04-051-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-052-7/+7
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* composer run cs:fixCôme Chilliet2023-01-204-10/+7
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Cache available languages locallyJulius Härtl2022-12-071-1/+12
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Use {$var} instead of ${var} for PHP 8.2 compatibilityCôme Chilliet2022-06-141-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* 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>