ochre-sdk 1.3.7 → 1.3.8
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 +1 -1
- package/dist/languages.d.mts +4 -12
- package/dist/languages.mjs +2 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -136,7 +136,7 @@ const result = await fetchWebsite("uchicago-node", { languages });
|
|
|
136
136
|
|
|
137
137
|
OCHRE publishes ISO 639-2 language codes in their bibliographic (B) form, the Library of Congress MARC convention, and every language the SDK reads or accepts uses them: `per` for Persian, not ISO 639-3 `fas`, and likewise `fre`, `chi` and `ger`. There are three exceptions: the ISO 639-3 identifier where ISO 639-2 has no code (`yua`, `lzh`), the terminology (T) form for Dutch (`nld`, not `dut`), and a few codes of OCHRE's own for transliterations and vocabularies (`ota-xlt`, `rel`), some of which collide with unrelated ISO 639-3 languages. Requests in any other code are rejected, with the OCHRE code to use when one exists.
|
|
138
138
|
|
|
139
|
-
`OCHRE_LANGUAGES` maps every code OCHRE publishes to its name, what it tags (a `language`, a `transliteration`, a `vocabulary` or `non-linguistic` content), the standard the code itself is taken from (`iso639-2b`, or one of the exceptions: `iso639-3`, `iso639-2t
|
|
139
|
+
`OCHRE_LANGUAGES` maps every code OCHRE publishes to its name, what it tags (a `language`, a `transliteration`, a `vocabulary` or `non-linguistic` content), the standard the code itself is taken from (`iso639-2b`, or one of the exceptions: `iso639-3`, `iso639-2t` or `ochre`), its ISO 639-3 identifier and the BCP 47 tag to give `Intl` or an HTML `lang` attribute. Either standard is `null` when none fits.
|
|
140
140
|
|
|
141
141
|
```ts
|
|
142
142
|
import { getOchreLanguage, getOchreLanguageCode } from "ochre-sdk";
|
package/dist/languages.d.mts
CHANGED
|
@@ -16,11 +16,10 @@ export type OchreLanguageKind = "language" | "transliteration" | "vocabulary" |
|
|
|
16
16
|
* - `iso639-2t`: the terminology ISO 639-2 code, which OCHRE uses for Dutch
|
|
17
17
|
* - `iso639-3`: the ISO 639-3 identifier, for languages ISO 639-2 has no
|
|
18
18
|
* code for
|
|
19
|
-
* - `bcp47`: a BCP 47 tag (`zh-Latn-pinyin`)
|
|
20
19
|
* - `ochre`: a code of OCHRE's own, which may collide with an unrelated
|
|
21
|
-
* ISO 639-3 language (`
|
|
20
|
+
* ISO 639-3 language (`rel` is OCHRE's relator vocabulary, ISO's Rendille)
|
|
22
21
|
*/
|
|
23
|
-
export type OchreLanguageStandard = "iso639-2b" | "iso639-2t" | "iso639-3" | "
|
|
22
|
+
export type OchreLanguageStandard = "iso639-2b" | "iso639-2t" | "iso639-3" | "ochre";
|
|
24
23
|
/**
|
|
25
24
|
* A language code OCHRE publishes, with the standard codes it stands for
|
|
26
25
|
*/
|
|
@@ -321,10 +320,10 @@ export declare const OCHRE_LANGUAGES: {
|
|
|
321
320
|
readonly iso639_3: "guj";
|
|
322
321
|
readonly bcp47: "gu";
|
|
323
322
|
};
|
|
324
|
-
readonly
|
|
323
|
+
readonly pinyin: {
|
|
325
324
|
readonly name: "Hanyu Pinyin";
|
|
326
325
|
readonly kind: "transliteration";
|
|
327
|
-
readonly standard: "
|
|
326
|
+
readonly standard: "ochre";
|
|
328
327
|
readonly iso639_3: "cmn";
|
|
329
328
|
readonly bcp47: "zh-Latn-pinyin";
|
|
330
329
|
};
|
|
@@ -398,13 +397,6 @@ export declare const OCHRE_LANGUAGES: {
|
|
|
398
397
|
readonly iso639_3: "kor";
|
|
399
398
|
readonly bcp47: "ko";
|
|
400
399
|
};
|
|
401
|
-
readonly lmc: {
|
|
402
|
-
readonly name: "Late Middle Chinese";
|
|
403
|
-
readonly kind: "language";
|
|
404
|
-
readonly standard: "ochre";
|
|
405
|
-
readonly iso639_3: "ltc";
|
|
406
|
-
readonly bcp47: "ltc";
|
|
407
|
-
};
|
|
408
400
|
readonly lat: {
|
|
409
401
|
readonly name: "Latin";
|
|
410
402
|
readonly kind: "language";
|
package/dist/languages.mjs
CHANGED
|
@@ -272,10 +272,10 @@ const OCHRE_LANGUAGES = {
|
|
|
272
272
|
iso639_3: "guj",
|
|
273
273
|
bcp47: "gu"
|
|
274
274
|
},
|
|
275
|
-
|
|
275
|
+
pinyin: {
|
|
276
276
|
name: "Hanyu Pinyin",
|
|
277
277
|
kind: "transliteration",
|
|
278
|
-
standard: "
|
|
278
|
+
standard: "ochre",
|
|
279
279
|
iso639_3: "cmn",
|
|
280
280
|
bcp47: "zh-Latn-pinyin"
|
|
281
281
|
},
|
|
@@ -349,13 +349,6 @@ const OCHRE_LANGUAGES = {
|
|
|
349
349
|
iso639_3: "kor",
|
|
350
350
|
bcp47: "ko"
|
|
351
351
|
},
|
|
352
|
-
lmc: {
|
|
353
|
-
name: "Late Middle Chinese",
|
|
354
|
-
kind: "language",
|
|
355
|
-
standard: "ochre",
|
|
356
|
-
iso639_3: "ltc",
|
|
357
|
-
bcp47: "ltc"
|
|
358
|
-
},
|
|
359
352
|
lat: {
|
|
360
353
|
name: "Latin",
|
|
361
354
|
kind: "language",
|