File: inlang.config.js

package info (click to toggle)
python-djangorestframework-simplejwt 5.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 884 kB
  • sloc: python: 3,730; makefile: 213; javascript: 40; sh: 6
file content (47 lines) | stat: -rw-r--r-- 1,047 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// filename: inlang.config.js

export async function defineConfig(env) {
  // importing a plugin
  const plugin = await env.$import(
    "https://cdn.jsdelivr.net/gh/jannesblobel/inlang-plugin-po@1/dist/index.js"
  );

  // most plugins require additional config, read the plugins documentation
  // for the required config and correct usage.
  const pluginConfig = {
    pathPattern:
      "./rest_framework_simplejwt/locale/{language}/LC_MESSAGES/django.po",
    referenceResourcePath: null,
  };

  return {
    referenceLanguage: "en",
    languages: [
      "en",
      "cs",
      "de",
      "es",
      "es_AR",
      "es_CL",
      "fa_IR",
      "fr",
      "id_ID",
      "it_IT",
      "ko_KR",
      "nl_NL",
      "pl_PL",
      "pt_BR",
      "ro",
      "ru_RU",
      "sl",
      "sv",
      "tr",
      "uk_UA",
      "zh_Hans",
    ],
    readResources: (args) =>
      plugin.readResources({ ...args, ...env, pluginConfig }),
    writeResources: (args) =>
      plugin.writeResources({ ...args, ...env, pluginConfig }),
  };
}