@gjsify/pim 0.64.56 → 0.64.57

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/README.md CHANGED
@@ -19,6 +19,20 @@ gjsify install @gjsify/pim
19
19
 
20
20
  The root export carries the port, the types (`CalendarInfo`, `RawItem`, `CollectionDelta`, ...), the error classes (`BackendUnavailableError`, `BackendAuthError`, `ConflictError`, ...) and `setPimTranslator` for localized error messages.
21
21
 
22
+ ## Translations
23
+
24
+ The package binds no gettext domain, because it runs on Node as well. Its messages go through the translator the app registers with `setPimTranslator`, so they must be in the app's own catalogue. The package ships them for that in `po/`:
25
+
26
+ - `po/gjsify-pim.pot`: the template, to merge into the app's template.
27
+ - `po/<lang>.po`: the translations (German so far), to merge into the app's catalogue before compiling it.
28
+
29
+ ```sh
30
+ pim="$(dirname "$(dirname "$(node -p "require.resolve('@gjsify/pim/po/de.po')")")")"
31
+ msgcat --use-first po/de.po "$pim/po/de.po" | msgfmt --check -o locale/de/LC_MESSAGES/my-app.mo -
32
+ ```
33
+
34
+ `./dev-i18n.sh` refreshes the template and the catalogues after a message changes; `./dev-i18n.sh --check` fails when either is stale or a catalogue is incomplete.
35
+
22
36
  ## Usage
23
37
 
24
38
  ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/pim",
3
- "version": "0.64.56",
3
+ "version": "0.64.57",
4
4
  "description": "Calendars and tasks behind one port: the CalendarBackend interface moves iCalendar text, drivers move it to CalDAV (plain fetch, every runtime) or Evolution Data Server (typelibs loaded on first use).",
5
5
  "module": "lib/esm/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -18,16 +18,21 @@
18
18
  "./eds": {
19
19
  "types": "./lib/types/eds/index.d.ts",
20
20
  "default": "./lib/esm/eds/index.js"
21
- }
21
+ },
22
+ "./po/*": "./po/*"
22
23
  },
23
24
  "files": [
24
25
  "lib",
26
+ "po",
27
+ "!po/POTFILES.in",
25
28
  "!lib/types/**/*.spec.d.ts",
26
29
  "!lib/types/fake-dav-server.d.ts"
27
30
  ],
28
31
  "scripts": {
29
32
  "clear": "gjsify clear lib tmp tsconfig.tsbuildinfo test.gjs.mjs test.node.mjs",
30
33
  "check": "gjsify tsc --noEmit",
34
+ "i18n:extract": "./dev-i18n.sh",
35
+ "i18n:check": "./dev-i18n.sh --check",
31
36
  "build": "gjsify run build:gjsify && gjsify run build:types",
32
37
  "build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}' 'src/test.gjs.mts' 'src/fake-dav-server.ts'",
33
38
  "build:types": "gjsify tsc",
@@ -51,17 +56,17 @@
51
56
  "@girs/ecal-2.0": "5.4.0",
52
57
  "@girs/edataserver-1.2": "5.4.0",
53
58
  "@girs/icalglib-3.0": "5.4.0",
54
- "@gjsify/dav": "0.64.56"
59
+ "@gjsify/dav": "0.64.57"
55
60
  },
56
61
  "devDependencies": {
57
62
  "@girs/gio-2.0": "5.4.0",
58
63
  "@girs/gjs": "5.4.0",
59
64
  "@girs/glib-2.0": "5.4.0",
60
65
  "@girs/gobject-2.0": "5.4.0",
61
- "@gjsify/cli": "0.64.56",
62
- "@gjsify/fetch": "0.64.56",
63
- "@gjsify/http": "0.64.56",
64
- "@gjsify/unit": "0.64.56",
66
+ "@gjsify/cli": "0.64.57",
67
+ "@gjsify/fetch": "0.64.57",
68
+ "@gjsify/http": "0.64.57",
69
+ "@gjsify/unit": "0.64.57",
65
70
  "@types/node": "^25.9.2",
66
71
  "typescript": "^6.0.3"
67
72
  },
package/po/LINGUAS ADDED
@@ -0,0 +1 @@
1
+ de
package/po/POTFILES.in ADDED
@@ -0,0 +1,14 @@
1
+ src/backend.ts
2
+ src/caldav/backend.ts
3
+ src/caldav/delta.ts
4
+ src/caldav/errors.ts
5
+ src/caldav/index.ts
6
+ src/eds/driver.gjs.ts
7
+ src/eds/errors.ts
8
+ src/eds/index.ts
9
+ src/eds/libs.gjs.ts
10
+ src/errors.ts
11
+ src/i18n.ts
12
+ src/index.ts
13
+ src/optional.ts
14
+ src/types.ts
package/po/de.po ADDED
@@ -0,0 +1,83 @@
1
+ # German translations for @gjsify/pim.
2
+ # This file is distributed under the same license as the @gjsify/pim package (MIT).
3
+ #
4
+ msgid ""
5
+ msgstr ""
6
+ "Project-Id-Version: gjsify-pim\n"
7
+ "Report-Msgid-Bugs-To: https://github.com/gjsify/gjsify/issues\n"
8
+ "POT-Creation-Date: 2026-11-20 12:35+0100\n"
9
+ "PO-Revision-Date: 2026-10-29 21:01+0100\n"
10
+ "Last-Translator: gjsify contributors\n"
11
+ "Language-Team: German\n"
12
+ "Language: de\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+
18
+ #: src/caldav/backend.ts:91 src/caldav/delta.ts:133
19
+ msgid "no calendar \"{uid}\""
20
+ msgstr "Kein Kalender „{uid}“"
21
+
22
+ #: src/caldav/backend.ts:91
23
+ msgid "no task list \"{uid}\""
24
+ msgstr "Keine Aufgabenliste „{uid}“"
25
+
26
+ #: src/caldav/backend.ts:175
27
+ msgid "createItem: the component has no UID"
28
+ msgstr "createItem: Die Komponente hat keine UID"
29
+
30
+ #: src/caldav/backend.ts:181
31
+ msgid "createItem: \"{uid}\" already exists in \"{calendar}\""
32
+ msgstr "createItem: „{uid}“ existiert in „{calendar}“ bereits"
33
+
34
+ #: src/caldav/backend.ts:190
35
+ msgid "createItem: \"{calendar}\" refused the write (read-only?)"
36
+ msgstr ""
37
+ "createItem: „{calendar}“ hat das Schreiben verweigert (schreibgeschützt?)"
38
+
39
+ #: src/caldav/backend.ts:209
40
+ msgid "updateItem: no \"{uid}\" in \"{calendar}\""
41
+ msgstr "updateItem: Kein „{uid}“ in „{calendar}“"
42
+
43
+ #: src/caldav/backend.ts:216
44
+ msgid "updateItem: \"{uid}\" changed on the server since it was read"
45
+ msgstr ""
46
+ "updateItem: „{uid}“ hat sich auf dem Server geändert, seit es gelesen wurde"
47
+
48
+ #: src/caldav/backend.ts:222
49
+ msgid "updateItem: \"{calendar}\" refused the write (read-only?)"
50
+ msgstr ""
51
+ "updateItem: „{calendar}“ hat das Schreiben verweigert (schreibgeschützt?)"
52
+
53
+ #: src/caldav/errors.ts:14
54
+ msgid "{label}: the server rejected the credentials (401)"
55
+ msgstr "{label}: Der Server hat die Zugangsdaten abgelehnt (401)"
56
+
57
+ #: src/caldav/errors.ts:19
58
+ msgid "{label}: {method} failed with {status}"
59
+ msgstr "{label}: {method} ist mit {status} fehlgeschlagen"
60
+
61
+ #: src/caldav/errors.ts:24
62
+ msgid "{label}: {message}"
63
+ msgstr "{label}: {message}"
64
+
65
+ #: src/eds/driver.gjs.ts:71
66
+ msgid "no enabled calendar \"{uid}\""
67
+ msgstr "Kein aktivierter Kalender „{uid}“"
68
+
69
+ #: src/eds/driver.gjs.ts:71
70
+ msgid "no enabled task list \"{uid}\""
71
+ msgstr "Keine aktivierte Aufgabenliste „{uid}“"
72
+
73
+ #: src/eds/driver.gjs.ts:185 src/eds/driver.gjs.ts:196
74
+ msgid "\"{calendar}\" is read-only"
75
+ msgstr "„{calendar}“ ist schreibgeschützt"
76
+
77
+ #: src/eds/errors.ts:13
78
+ msgid "{message}: {cause}"
79
+ msgstr "{message}: {cause}"
80
+
81
+ #: src/optional.ts:24
82
+ msgid "{label} typelib not available: {message}"
83
+ msgstr "Typelib {label} nicht verfügbar: {message}"
@@ -0,0 +1,82 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the gjsify-pim package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: gjsify-pim\n"
10
+ "Report-Msgid-Bugs-To: https://github.com/gjsify/gjsify/issues\n"
11
+ "POT-Creation-Date: 2026-11-21 07:20+0100\n"
12
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=CHARSET\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+
20
+ #: src/caldav/backend.ts:91 src/caldav/delta.ts:133
21
+ msgid "no calendar \"{uid}\""
22
+ msgstr ""
23
+
24
+ #: src/caldav/backend.ts:91
25
+ msgid "no task list \"{uid}\""
26
+ msgstr ""
27
+
28
+ #: src/caldav/backend.ts:175
29
+ msgid "createItem: the component has no UID"
30
+ msgstr ""
31
+
32
+ #: src/caldav/backend.ts:181
33
+ msgid "createItem: \"{uid}\" already exists in \"{calendar}\""
34
+ msgstr ""
35
+
36
+ #: src/caldav/backend.ts:190
37
+ msgid "createItem: \"{calendar}\" refused the write (read-only?)"
38
+ msgstr ""
39
+
40
+ #: src/caldav/backend.ts:209
41
+ msgid "updateItem: no \"{uid}\" in \"{calendar}\""
42
+ msgstr ""
43
+
44
+ #: src/caldav/backend.ts:216
45
+ msgid "updateItem: \"{uid}\" changed on the server since it was read"
46
+ msgstr ""
47
+
48
+ #: src/caldav/backend.ts:222
49
+ msgid "updateItem: \"{calendar}\" refused the write (read-only?)"
50
+ msgstr ""
51
+
52
+ #: src/caldav/errors.ts:14
53
+ msgid "{label}: the server rejected the credentials (401)"
54
+ msgstr ""
55
+
56
+ #: src/caldav/errors.ts:19
57
+ msgid "{label}: {method} failed with {status}"
58
+ msgstr ""
59
+
60
+ #: src/caldav/errors.ts:24
61
+ msgid "{label}: {message}"
62
+ msgstr ""
63
+
64
+ #: src/eds/driver.gjs.ts:71
65
+ msgid "no enabled calendar \"{uid}\""
66
+ msgstr ""
67
+
68
+ #: src/eds/driver.gjs.ts:71
69
+ msgid "no enabled task list \"{uid}\""
70
+ msgstr ""
71
+
72
+ #: src/eds/driver.gjs.ts:185 src/eds/driver.gjs.ts:196
73
+ msgid "\"{calendar}\" is read-only"
74
+ msgstr ""
75
+
76
+ #: src/eds/errors.ts:13
77
+ msgid "{message}: {cause}"
78
+ msgstr ""
79
+
80
+ #: src/optional.ts:24
81
+ msgid "{label} typelib not available: {message}"
82
+ msgstr ""