lightnet 2.18.1 → 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 CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 2.18.1
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "lightnet",
3
3
  "type": "module",
4
4
  "license": "MIT",
5
- "version": "2.18.1",
5
+ "version": "2.18.2",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/LightNetDev/lightnet",
@@ -15,7 +15,7 @@ const categories = await getCategories(currentLocale, t)
15
15
 
16
16
  {
17
17
  categories.length && (
18
- <Section title={title ?? t("ln.category", { count: categories.length })}>
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.category_other: Kategorien
4
- ln.category_one: Kategorie
5
- ln.language_one: Sprache
6
- ln.language_other: Sprachen
7
- ln.type_one: Typ
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.category_one: Category
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.category_other: Categories
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.language_one: Language
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.language_other: Languages
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.type_one: Type
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.category_one: Категория
5
- ln.category_other: Категории
6
- ln.language_one: Язык
7
- ln.language_other: Языки
8
- ln.type_one: Тип
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.category_one: Категорія
5
- ln.category_other: Категорії
6
- ln.language_one: Мова
7
- ln.language_other: Мови
8
- ln.type_one: Тип
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: Пошук за назвою, автором, описом...
@@ -51,9 +51,11 @@ export type LightNetTranslationKey =
51
51
  | "ln.404.go-to-the-home-page"
52
52
  | "ln.404.page-not-found"
53
53
  | "ln.category"
54
+ | "ln.categories"
54
55
  | "ln.language"
56
+ | "ln.languages"
55
57
  | "ln.external-link"
56
- | "ln.type_one"
58
+ | "ln.type"
57
59
  | "ln.details.open"
58
60
  | "ln.details.share"
59
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.category", { count: categories.length })}</Label>
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.language", { count: translations.length + 1 })}</Label>
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.language_one")}
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.type_one")}
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.category_one")}
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.language_one",
4
+ "ln.language",
5
5
  "ln.search.placeholder",
6
6
  "ln.search.all-languages",
7
- "ln.type_one",
7
+ "ln.type",
8
8
  "ln.search.all-types",
9
- "ln.category_one",
9
+ "ln.category",
10
10
  "ln.search.all-categories",
11
11
  "ln.search.more-results",
12
12
  ] as const