From 7174d697d4cef6ed7459d0e9bd1234cebaffda87 Mon Sep 17 00:00:00 2001 From: Bastian Greshake Tzovaras Date: Thu, 27 Nov 2025 18:46:40 +0100 Subject: [PATCH] [docs] expand category strings explanation Signed-off-by: Bastian Greshake Tzovaras Co-authored-by: Bastian Greshake Tzovaras Co-committed-by: Bastian Greshake Tzovaras --- docs/TRANSLATIONS.md | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/docs/TRANSLATIONS.md b/docs/TRANSLATIONS.md index 14c749c2c..175e961d3 100644 --- a/docs/TRANSLATIONS.md +++ b/docs/TRANSLATIONS.md @@ -38,17 +38,27 @@ Android and iOS share most of the strings. Codeberg Translate automatically sync ### Categories strings -Search categories synonyms/aliases usually shouldn't be just direct translations from English, but rather adaptations - e.g. some specific terms could be used in your language to search for a certain feature and they might not have English equivalents. +Search categories synonyms/aliases usually should **not** just be direct translations from English, but rather adaptations as some specific terms could be used in your language to search for a certain feature and they might not have English equivalents. It's just a matter of "what would you type in the search in to find shop=mall?" (As a concrete example, in regional German dialects, some types of corner/convenience stores or kiosks are called "Spätis". This has no direct translation into English, but would be a relevant search term when looking for `shop=kiosk`). -Some translations are borrowed from the common category (`@` in the key). Please do not duplicate translations if a category in the key already includes it. +Translations can be borrowed from a common category (indicated by the use of a `@` in the key). Please do not duplicate translations that are already inherited from a parent. Syntax: -- | - used to separate synonyms. -- 1-9 - digits in front of a synonym indicate the number of symbols that need to be - typed in a search query to make this synonym appear in the list of suggestions. - Located immediately at the start of a synonym. At most one - digit per synonym is allowed. -It's possible to use emoji codes as search synonyms, e.g. U+1F6B0 for potable water. + +- `|` - used to separate synonyms. +- `1`-`9` - a digit in front of a synonym indicate the number of characters that need to be typed in a search query to make this synonym appear in the list of suggestions. It is located immediately at the start of a synonym. At most one digit per synonym is allowed. This number doesn't need to be copied from the English string when translating. + +It's also possible to use emoji codes as search synonyms, e.g. U+1F6B0 for potable water. You do not have to repeat/duplicate terms or emoji that are already listed in the English source, as those will always be searched as well. + +#### Example + +Look at the following category string: + +`"shop-furniture|@shop": "4Furniture"` + +Here, `4Furniture` indicates that `Furniture` will be suggested after the user types `furn` and beyond. +Furthermore, `@shop` in the key declaration indicate that translations from the `@shop` category will also be used to search for `shop=furniture` POIs. For this reason, translations that are already available in the categories keys do not have to be repeated. + +#### Typo matching For all languages with nominative and gentive cases (e.g. Slavic languagues like Russian, Ukrainian, Belarus, Serbian), state _short_ nouns in nominative and genitive case, e.g. `Вино|вина`,