lightnet 2.18.0 → 2.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/components/CategoriesOverview.astro +1 -1
- package/src/i18n/translations/de.yml +5 -6
- package/src/i18n/translations/en.yml +5 -28
- package/src/i18n/translations/ru.yml +5 -6
- package/src/i18n/translations/uk.yml +5 -6
- package/src/i18n/translations.ts +5 -1
- package/src/pages/details-page/components/details/Categories.astro +1 -1
- package/src/pages/details-page/components/details/Languages.astro +1 -1
- package/src/pages/search-page/components/SearchFilter.tsx +3 -3
- package/src/pages/search-page/utils/search-translations.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# lightnet
|
|
2
2
|
|
|
3
|
+
## 2.18.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#232](https://github.com/LightNetDev/LightNet/pull/232) [`1ab5c4e`](https://github.com/LightNetDev/LightNet/commit/1ab5c4ea5d081d05f99f9e668e05e8cfd23a890d) Thanks [@smn-cds](https://github.com/smn-cds)! - Simplify plural rules.
|
|
8
|
+
|
|
9
|
+
## 2.18.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#230](https://github.com/LightNetDev/LightNet/pull/230) [`afab19a`](https://github.com/LightNetDev/LightNet/commit/afab19a4aa365958289c99805bdf94c6bca978d3) Thanks [@smn-cds](https://github.com/smn-cds)! - Register uk and ru translations.
|
|
14
|
+
|
|
3
15
|
## 2.18.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ const categories = await getCategories(currentLocale, t)
|
|
|
15
15
|
|
|
16
16
|
{
|
|
17
17
|
categories.length && (
|
|
18
|
-
<Section title={title ?? t("ln.
|
|
18
|
+
<Section title={title ?? t("ln.categories")}>
|
|
19
19
|
<ul class="flex w-full flex-wrap gap-2 sm:gap-3">
|
|
20
20
|
{categories.map((category) => (
|
|
21
21
|
<li class="flex max-w-56 grow">
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
ln.404.go-to-the-home-page: Zurück zur Startseite
|
|
2
2
|
ln.404.page-not-found: Seite nicht gefunden
|
|
3
|
-
ln.
|
|
4
|
-
ln.
|
|
5
|
-
ln.
|
|
6
|
-
ln.
|
|
7
|
-
ln.
|
|
8
|
-
ln.type_other: Typen
|
|
3
|
+
ln.categories: Kategorien
|
|
4
|
+
ln.category: Kategorie
|
|
5
|
+
ln.language: Sprache
|
|
6
|
+
ln.languages: Sprachen
|
|
7
|
+
ln.type: Typ
|
|
9
8
|
ln.external-link: Externer link
|
|
10
9
|
ln.details.open: Öffnen
|
|
11
10
|
ln.details.part-of-collection: Teil der Sammlung
|
|
@@ -20,56 +20,33 @@ ln.home.title: Home
|
|
|
20
20
|
|
|
21
21
|
# Label for a single media item category.
|
|
22
22
|
#
|
|
23
|
-
# Define the plural forms for different quantities as follows:
|
|
24
|
-
# - ln.category_one : for a singular item (e.g., "1 item")
|
|
25
|
-
# - ln.category_two : for exactly two items
|
|
26
|
-
# - ln.category_few : for a few items (language-specific rules)
|
|
27
|
-
# - ln.category_many : for many items (language-specific rules)
|
|
28
|
-
# - ln.category_other: for all other cases
|
|
29
|
-
#
|
|
30
|
-
# For guidance on the correct plural forms for your language,
|
|
31
|
-
# use this tool: https://jsfiddle.net/6bpxsgd4
|
|
32
|
-
#
|
|
33
23
|
# English: Category
|
|
34
24
|
# Used on: https://sk8-ministries.pages.dev/en/media
|
|
35
|
-
ln.
|
|
25
|
+
ln.category: Category
|
|
36
26
|
|
|
37
27
|
# Label for multiple media item categories.
|
|
38
28
|
#
|
|
39
29
|
# English: Categories
|
|
40
30
|
# Used on: https://sk8-ministries.pages.dev/en/media/how-to-360-flip--en/
|
|
41
|
-
ln.
|
|
31
|
+
ln.categories: Categories
|
|
42
32
|
|
|
43
33
|
# Label for a single language.
|
|
44
34
|
#
|
|
45
|
-
# Define the plural forms for different quantities as follows:
|
|
46
|
-
# - ln.language_one : for a singular item (e.g., "1 item")
|
|
47
|
-
# - ln.language_two : for exactly two items
|
|
48
|
-
# - ln.language_few : for a few items (language-specific rules)
|
|
49
|
-
# - ln.language_many : for many items (language-specific rules)
|
|
50
|
-
# - ln.language_other: for all other cases
|
|
51
|
-
#
|
|
52
|
-
# For guidance on the correct plural forms for your language,
|
|
53
|
-
# use this tool: https://jsfiddle.net/6bpxsgd4
|
|
54
|
-
#
|
|
55
35
|
# English: Language
|
|
56
36
|
# Used on: https://sk8-ministries.pages.dev/en/media
|
|
57
|
-
ln.
|
|
37
|
+
ln.language: Language
|
|
58
38
|
|
|
59
39
|
# Label for multiple languages.
|
|
60
40
|
#
|
|
61
41
|
# English: Languages
|
|
62
42
|
# Used on: https://sk8-ministries.pages.dev/en/media/how-to-kickflip--en/
|
|
63
|
-
ln.
|
|
43
|
+
ln.languages: Languages
|
|
64
44
|
|
|
65
45
|
# Label for a single media type.
|
|
66
46
|
#
|
|
67
47
|
# English: Type
|
|
68
48
|
# Used on: https://sk8-ministries.pages.dev/en/media
|
|
69
|
-
ln.
|
|
70
|
-
|
|
71
|
-
# English: Types
|
|
72
|
-
ln.type_other: Types
|
|
49
|
+
ln.type: Type
|
|
73
50
|
|
|
74
51
|
# Accessibility label for an external link.
|
|
75
52
|
# This is only "visible" to a screen-reader.
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
ln.header.open-main-menu: Открыть главное меню
|
|
2
2
|
ln.header.select-language: Выберите язык
|
|
3
3
|
ln.home.title: Главная
|
|
4
|
-
ln.
|
|
5
|
-
ln.
|
|
6
|
-
ln.
|
|
7
|
-
ln.
|
|
8
|
-
ln.
|
|
9
|
-
ln.type_other: Типы
|
|
4
|
+
ln.category: Категория
|
|
5
|
+
ln.categories: Категории
|
|
6
|
+
ln.language: Язык
|
|
7
|
+
ln.languages: Языки
|
|
8
|
+
ln.type: Тип
|
|
10
9
|
ln.external-link: Внешняя ссылка
|
|
11
10
|
ln.search.title: Поиск
|
|
12
11
|
ln.search.placeholder: Поиск по названию, автору, описанию...
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
ln.header.open-main-menu: Відкрити головне меню
|
|
2
2
|
ln.header.select-language: Оберіть мову
|
|
3
3
|
ln.home.title: Головна
|
|
4
|
-
ln.
|
|
5
|
-
ln.
|
|
6
|
-
ln.
|
|
7
|
-
ln.
|
|
8
|
-
ln.
|
|
9
|
-
ln.type_other: Типи
|
|
4
|
+
ln.category: Категорія
|
|
5
|
+
ln.categories: Категорії
|
|
6
|
+
ln.language: Мова
|
|
7
|
+
ln.languages: Мови
|
|
8
|
+
ln.type: Тип
|
|
10
9
|
ln.external-link: Зовнішнє посилання
|
|
11
10
|
ln.search.title: Пошук
|
|
12
11
|
ln.search.placeholder: Пошук за назвою, автором, описом...
|
package/src/i18n/translations.ts
CHANGED
|
@@ -3,6 +3,8 @@ import YAML from "yaml"
|
|
|
3
3
|
const builtInTranslations = {
|
|
4
4
|
en: () => import("./translations/en.yml?raw"),
|
|
5
5
|
de: () => import("./translations/de.yml?raw"),
|
|
6
|
+
uk: () => import("./translations/uk.yml?raw"),
|
|
7
|
+
ru: () => import("./translations/ru.yml?raw"),
|
|
6
8
|
} as const
|
|
7
9
|
|
|
8
10
|
type BuiltInLanguage = keyof typeof builtInTranslations
|
|
@@ -49,9 +51,11 @@ export type LightNetTranslationKey =
|
|
|
49
51
|
| "ln.404.go-to-the-home-page"
|
|
50
52
|
| "ln.404.page-not-found"
|
|
51
53
|
| "ln.category"
|
|
54
|
+
| "ln.categories"
|
|
52
55
|
| "ln.language"
|
|
56
|
+
| "ln.languages"
|
|
53
57
|
| "ln.external-link"
|
|
54
|
-
| "ln.
|
|
58
|
+
| "ln.type"
|
|
55
59
|
| "ln.details.open"
|
|
56
60
|
| "ln.details.share"
|
|
57
61
|
| "ln.details.part-of-collection"
|
|
@@ -17,7 +17,7 @@ const { t } = Astro.locals.i18n
|
|
|
17
17
|
{
|
|
18
18
|
!!categories?.length && (
|
|
19
19
|
<div>
|
|
20
|
-
<Label>{t("ln.
|
|
20
|
+
<Label>{t("ln.categories")}</Label>
|
|
21
21
|
<ul class="flex flex-wrap gap-2">
|
|
22
22
|
{categories.map(async (category) => (
|
|
23
23
|
<li class="flex rounded-lg bg-gray-200 px-4 py-1 text-gray-500 hover:bg-gray-300">
|
|
@@ -24,7 +24,7 @@ const { t } = Astro.locals.i18n
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
26
|
<div>
|
|
27
|
-
<Label>{t("ln.
|
|
27
|
+
<Label>{translations.length ? t("ln.languages") : t("ln.language")}</Label>
|
|
28
28
|
<ul class="flex flex-wrap gap-2">
|
|
29
29
|
<li class="py-1 pe-2 text-gray-800">
|
|
30
30
|
{resolveTranslatedLanguage(item.data.language, t).name}
|
|
@@ -111,7 +111,7 @@ export default function SearchFilter({
|
|
|
111
111
|
<div className="mb-8 grid grid-cols-1 gap-2 sm:grid-cols-3 sm:gap-6 md:mb-10">
|
|
112
112
|
{languageFilterEnabled && (
|
|
113
113
|
<Select
|
|
114
|
-
label={t("ln.
|
|
114
|
+
label={t("ln.language")}
|
|
115
115
|
initialValue={language}
|
|
116
116
|
valueChange={(val) => setLanguage(val)}
|
|
117
117
|
options={[
|
|
@@ -126,7 +126,7 @@ export default function SearchFilter({
|
|
|
126
126
|
|
|
127
127
|
{typesFilterEnabled && (
|
|
128
128
|
<Select
|
|
129
|
-
label={t("ln.
|
|
129
|
+
label={t("ln.type")}
|
|
130
130
|
initialValue={type}
|
|
131
131
|
valueChange={(val) => setType(val)}
|
|
132
132
|
options={[
|
|
@@ -138,7 +138,7 @@ export default function SearchFilter({
|
|
|
138
138
|
|
|
139
139
|
{categoriesFilterEnabled && (
|
|
140
140
|
<Select
|
|
141
|
-
label={t("ln.
|
|
141
|
+
label={t("ln.category")}
|
|
142
142
|
initialValue={category}
|
|
143
143
|
valueChange={(val) => setCategory(val)}
|
|
144
144
|
options={[
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const translationKeys = [
|
|
2
2
|
"ln.search.no-results",
|
|
3
3
|
"ln.search.title",
|
|
4
|
-
"ln.
|
|
4
|
+
"ln.language",
|
|
5
5
|
"ln.search.placeholder",
|
|
6
6
|
"ln.search.all-languages",
|
|
7
|
-
"ln.
|
|
7
|
+
"ln.type",
|
|
8
8
|
"ln.search.all-types",
|
|
9
|
-
"ln.
|
|
9
|
+
"ln.category",
|
|
10
10
|
"ln.search.all-categories",
|
|
11
11
|
"ln.search.more-results",
|
|
12
12
|
] as const
|