@ovh-ux/manager-common-translations 0.4.1

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.
Files changed (22) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +71 -0
  3. package/dist/@ovh-ux/manager-common-translations/bytes/Messages_de_DE.json +19 -0
  4. package/dist/@ovh-ux/manager-common-translations/bytes/Messages_en_GB.json +19 -0
  5. package/dist/@ovh-ux/manager-common-translations/bytes/Messages_es_ES.json +19 -0
  6. package/dist/@ovh-ux/manager-common-translations/bytes/Messages_fr_CA.json +19 -0
  7. package/dist/@ovh-ux/manager-common-translations/bytes/Messages_fr_FR.json +19 -0
  8. package/dist/@ovh-ux/manager-common-translations/bytes/Messages_it_IT.json +19 -0
  9. package/dist/@ovh-ux/manager-common-translations/bytes/Messages_pl_PL.json +19 -0
  10. package/dist/@ovh-ux/manager-common-translations/bytes/Messages_pt_PT.json +19 -0
  11. package/dist/@ovh-ux/manager-common-translations/clipboard/Messages_de_DE.json +5 -0
  12. package/dist/@ovh-ux/manager-common-translations/clipboard/Messages_en_GB.json +5 -0
  13. package/dist/@ovh-ux/manager-common-translations/clipboard/Messages_es_ES.json +5 -0
  14. package/dist/@ovh-ux/manager-common-translations/clipboard/Messages_fr_CA.json +5 -0
  15. package/dist/@ovh-ux/manager-common-translations/clipboard/Messages_fr_FR.json +5 -0
  16. package/dist/@ovh-ux/manager-common-translations/clipboard/Messages_it_IT.json +5 -0
  17. package/dist/@ovh-ux/manager-common-translations/clipboard/Messages_pl_PL.json +5 -0
  18. package/dist/@ovh-ux/manager-common-translations/clipboard/Messages_pt_PT.json +5 -0
  19. package/dist/index.cjs.js +1 -0
  20. package/dist/index.esm.js +8 -0
  21. package/dist/types/index.d.ts +5 -0
  22. package/package.json +30 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,49 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [0.4.1](https://github.com/ovh/manager/compare/@ovh-ux/manager-common-translations@0.4.0...@ovh-ux/manager-common-translations@0.4.1) (2025-02-27)
7
+
8
+ **Note:** Version bump only for package @ovh-ux/manager-common-translations
9
+
10
+
11
+
12
+
13
+
14
+ # [0.4.0](https://github.com/ovh/manager/compare/@ovh-ux/manager-common-translations@0.3.0...@ovh-ux/manager-common-translations@0.4.0) (2025-02-27)
15
+
16
+
17
+ ### Features
18
+
19
+ * **mrc:** add useBytes hook ([fe775b4](https://github.com/ovh/manager/commit/fe775b4e2d5bbeb3ad75a23cb0084e8534838781))
20
+
21
+
22
+
23
+
24
+
25
+ # [0.3.0](https://github.com/ovh/manager/compare/@ovh-ux/manager-common-translations@0.2.1...@ovh-ux/manager-common-translations@0.3.0) (2025-02-27)
26
+
27
+
28
+ ### Features
29
+
30
+ * **mrc:** add useBytes hook ([fe775b4](https://github.com/ovh/manager/commit/fe775b4e2d5bbeb3ad75a23cb0084e8534838781))
31
+
32
+
33
+
34
+
35
+
36
+ ## [0.2.1](https://github.com/ovh/manager/compare/@ovh-ux/manager-common-translations@0.2.0...@ovh-ux/manager-common-translations@0.2.1) (2025-02-06)
37
+
38
+ **Note:** Version bump only for package @ovh-ux/manager-common-translations
39
+
40
+
41
+
42
+
43
+
44
+ # [0.2.0](https://github.com/ovh/manager/compare/@ovh-ux/manager-common-translations@0.1.0...@ovh-ux/manager-common-translations@0.2.0) (2025-01-09)
45
+
46
+
47
+ ### Features
48
+
49
+ * **common-translations:** init common trans module ([#14752](https://github.com/ovh/manager/issues/14752)) ([8115270](https://github.com/ovh/manager/commit/8115270f1faee063ee2d8bec799b4afefcffcd4c))
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # @ovh-ux/manager-common-translations
2
+
3
+ The purpose of this package is to maintain the common reusable translations which can be consumed across the µ-apps.
4
+
5
+ ## Contribute to common translations package
6
+
7
+ Translations are split into multiple folders to facilitate lazy loading with i18next's [namespaces](https://www.i18next.com/principles/namespaces). Each folder must have it's own purpose in the context of it's usage.
8
+
9
+ !!! info
10
+ Translation keys must be generic and not include any app/module name as prefix/suffix as the content from this package will be made available for all the µ-apps.
11
+
12
+ ### Adding a new Namespace
13
+
14
+ 1. Create a new folder in `packages/manager/modules/common-translations/public/translations`
15
+ 2. Add `Messages_fr_FR.json` file.
16
+ 3. Add all the required translations with appropriate keys.
17
+ 4. Follow the usual translation process of **Submitting a request** to CMT team and then **Retrieving the translations** to make the corresponding changes in other locale files.
18
+
19
+ ### Add/Update translations in existing Namespace
20
+
21
+ 1. Add/Update the required content with appropriate keys in `Messages_fr_FR.json` file.
22
+ 2. Follow the usual translation process of **Submitting a request** to CMT team and then **Retrieving the translations** to make the corresponding changes in other locale files.
23
+
24
+ ## Consuming translations from the package
25
+
26
+ The "@ovh-ux/manager-common-translations" package provides the following,
27
+
28
+ 1. Content for all the supported locales.
29
+ 2. A `NAMESPACES` constant to facilitate easy loading of i18next's namespace.
30
+
31
+ To consume the translations provided by the package,
32
+
33
+ 1. You need to include the package as dependency in your µ-app or other package where you intend to consume it.
34
+
35
+ ```json
36
+ {
37
+ ...
38
+ ...
39
+ "dependencies": {
40
+ "@ovh-ux/manager-common-translations": "x.x.x",
41
+ ...
42
+ ...
43
+ }
44
+ }
45
+ ```
46
+
47
+ 2. In your React component, you can consume the translations from the package as shown in the below code-snippet.
48
+
49
+ ```
50
+ import { useTranslation } from 'react-i18next';
51
+ import { NAMESPACES } from '@ovh-ux/manager-common-translations';
52
+
53
+ export const ReactComponent = () => {
54
+ ...
55
+ const { t } = useTranslation(NAMESPACES.<NAMESPACE_NAME>);
56
+ ...
57
+
58
+ return (
59
+ ...
60
+ <>{{t('<TRANSLATION_KEY>')}}</>
61
+ ...
62
+ );
63
+ }
64
+ ```
65
+
66
+ !!! warning
67
+ **@ovh-ux/manager-vite-config** automatically includes the translation files in the final bundle of the µ-app. If the base config provided by this package is not consumed in your µ-app, it will be your responsibility to add these files in your bundle.
68
+
69
+
70
+
71
+
@@ -0,0 +1,19 @@
1
+ {
2
+ "unit_size_B": "B",
3
+ "unit_size_KB": "KB",
4
+ "unit_size_MB": "MB",
5
+ "unit_size_GB": "GB",
6
+ "unit_size_TB": "TB",
7
+ "unit_size_PB": "PB",
8
+ "unit_size_EB": "EB",
9
+ "unit_size_ZB": "ZB",
10
+ "unit_size_YB": "YB",
11
+ "unit_size_KiB": "KiB",
12
+ "unit_size_MiB": "MiB",
13
+ "unit_size_GiB": "GiB",
14
+ "unit_size_TiB": "TiB",
15
+ "unit_size_PiB": "PiB",
16
+ "unit_size_EiB": "EiB",
17
+ "unit_size_ZiB": "ZiB",
18
+ "unit_size_YiB": "YiB"
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "unit_size_B": "B",
3
+ "unit_size_KB": "KB",
4
+ "unit_size_MB": "MB",
5
+ "unit_size_GB": "GB",
6
+ "unit_size_TB": "TB",
7
+ "unit_size_PB": "PB",
8
+ "unit_size_EB": "EB",
9
+ "unit_size_ZB": "ZB",
10
+ "unit_size_YB": "YB",
11
+ "unit_size_KiB": "KiB",
12
+ "unit_size_MiB": "MiB",
13
+ "unit_size_GiB": "GiB",
14
+ "unit_size_TiB": "TiB",
15
+ "unit_size_PiB": "PiB",
16
+ "unit_size_EiB": "EiB",
17
+ "unit_size_ZiB": "ZiB",
18
+ "unit_size_YiB": "YiB"
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "unit_size_B": "B",
3
+ "unit_size_KB": "kB",
4
+ "unit_size_MB": "MB",
5
+ "unit_size_GB": "GB",
6
+ "unit_size_TB": "TB",
7
+ "unit_size_PB": "PB",
8
+ "unit_size_EB": "EB",
9
+ "unit_size_ZB": "ZB",
10
+ "unit_size_YB": "YB",
11
+ "unit_size_KiB": "KiB",
12
+ "unit_size_MiB": "MiB",
13
+ "unit_size_GiB": "GiB",
14
+ "unit_size_TiB": "TiB",
15
+ "unit_size_PiB": "PiB",
16
+ "unit_size_EiB": "EiB",
17
+ "unit_size_ZiB": "ZiB",
18
+ "unit_size_YiB": "YiB"
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "unit_size_B": "o",
3
+ "unit_size_KB": "ko",
4
+ "unit_size_MB": "Mo",
5
+ "unit_size_GB": "Go",
6
+ "unit_size_TB": "To",
7
+ "unit_size_PB": "Po",
8
+ "unit_size_EB": "Eo",
9
+ "unit_size_ZB": "Zo",
10
+ "unit_size_YB": "Yo",
11
+ "unit_size_KiB": "Kio",
12
+ "unit_size_MiB": "Mio",
13
+ "unit_size_GiB": "Gio",
14
+ "unit_size_TiB": "Tio",
15
+ "unit_size_PiB": "Pio",
16
+ "unit_size_EiB": "Eio",
17
+ "unit_size_ZiB": "Zio",
18
+ "unit_size_YiB": "Yio"
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "unit_size_B": "o",
3
+ "unit_size_KB": "ko",
4
+ "unit_size_MB": "Mo",
5
+ "unit_size_GB": "Go",
6
+ "unit_size_TB": "To",
7
+ "unit_size_PB": "Po",
8
+ "unit_size_EB": "Eo",
9
+ "unit_size_ZB": "Zo",
10
+ "unit_size_YB": "Yo",
11
+ "unit_size_KiB": "Kio",
12
+ "unit_size_MiB": "Mio",
13
+ "unit_size_GiB": "Gio",
14
+ "unit_size_TiB": "Tio",
15
+ "unit_size_PiB": "Pio",
16
+ "unit_size_EiB": "Eio",
17
+ "unit_size_ZiB": "Zio",
18
+ "unit_size_YiB": "Yio"
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "unit_size_B": "b",
3
+ "unit_size_KB": "kb",
4
+ "unit_size_MB": "MB",
5
+ "unit_size_GB": "GB",
6
+ "unit_size_TB": "TB",
7
+ "unit_size_PB": "PB",
8
+ "unit_size_EB": "EB",
9
+ "unit_size_ZB": "ZB",
10
+ "unit_size_YB": "YB",
11
+ "unit_size_KiB": "KiB",
12
+ "unit_size_MiB": "MiB",
13
+ "unit_size_GiB": "GiB",
14
+ "unit_size_TiB": "TiB",
15
+ "unit_size_PiB": "PiB",
16
+ "unit_size_EiB": "EiB",
17
+ "unit_size_ZiB": "ZiB",
18
+ "unit_size_YiB": "YiB"
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "unit_size_B": "B",
3
+ "unit_size_KB": "kB",
4
+ "unit_size_MB": "MB",
5
+ "unit_size_GB": "GB",
6
+ "unit_size_TB": "TB",
7
+ "unit_size_PB": "PB",
8
+ "unit_size_EB": "EB",
9
+ "unit_size_ZB": "ZB",
10
+ "unit_size_YB": "YB",
11
+ "unit_size_KiB": "KiB",
12
+ "unit_size_MiB": "MiB",
13
+ "unit_size_GiB": "GiB",
14
+ "unit_size_TiB": "TiB",
15
+ "unit_size_PiB": "PiB",
16
+ "unit_size_EiB": "EiB",
17
+ "unit_size_ZiB": "ZiB",
18
+ "unit_size_YiB": "YiB"
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "unit_size_B": "B",
3
+ "unit_size_KB": "KB",
4
+ "unit_size_MB": "MB",
5
+ "unit_size_GB": "GB",
6
+ "unit_size_TB": "TB",
7
+ "unit_size_PB": "PB",
8
+ "unit_size_EB": "EB",
9
+ "unit_size_ZB": "ZB",
10
+ "unit_size_YB": "YB",
11
+ "unit_size_KiB": "KiB",
12
+ "unit_size_MiB": "MiB",
13
+ "unit_size_GiB": "GiB",
14
+ "unit_size_TiB": "TiB",
15
+ "unit_size_PiB": "PiB",
16
+ "unit_size_EiB": "EiB",
17
+ "unit_size_ZiB": "ZiB",
18
+ "unit_size_YiB": "YiB"
19
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "clipboard_copy_success": "Kopiert",
3
+ "clipboard_copy_error": "Fehler beim Kopieren",
4
+ "clipboard_copy": "In die Zwischenablage kopieren"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "clipboard_copy_success": "Copied",
3
+ "clipboard_copy_error": "Copy error.",
4
+ "clipboard_copy": "Copy to clipboard"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "clipboard_copy_success": "Copiado",
3
+ "clipboard_copy_error": "Se ha producido un error al copiar.",
4
+ "clipboard_copy": "Copiar al portapapeles"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "clipboard_copy_success": "Copié",
3
+ "clipboard_copy_error": "Erreur de copie.",
4
+ "clipboard_copy": "Copier dans le presse-papier"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "clipboard_copy_success": "Copié",
3
+ "clipboard_copy_error": "Erreur de copie.",
4
+ "clipboard_copy": "Copier dans le presse-papier"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "clipboard_copy_success": "Copiato",
3
+ "clipboard_copy_error": "Errore di copia",
4
+ "clipboard_copy": "Copiare negli appunti"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "clipboard_copy_success": "Skopiowano",
3
+ "clipboard_copy_error": "Błąd kopiowania.",
4
+ "clipboard_copy": "Skopiuj do schowka"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "clipboard_copy_success": "Copiado",
3
+ "clipboard_copy_error": "Erro de cópia.",
4
+ "clipboard_copy": "Copiar para a área de transferência"
5
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o="@ovh-ux/manager-common-translations",t={BYTES:`${o}/bytes`,CLIPBOARD:`${o}/clipboard`};exports.NAMESPACES=t;exports.NAMESPACE_PREFIX=o;
@@ -0,0 +1,8 @@
1
+ const o = "@ovh-ux/manager-common-translations", n = {
2
+ BYTES: `${o}/bytes`,
3
+ CLIPBOARD: `${o}/clipboard`
4
+ };
5
+ export {
6
+ n as NAMESPACES,
7
+ o as NAMESPACE_PREFIX
8
+ };
@@ -0,0 +1,5 @@
1
+ export declare const NAMESPACE_PREFIX = "@ovh-ux/manager-common-translations";
2
+ export declare const NAMESPACES: {
3
+ BYTES: string;
4
+ CLIPBOARD: string;
5
+ };
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@ovh-ux/manager-common-translations",
3
+ "version": "0.4.1",
4
+ "description": "Common translations for Manager µ-apps",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/ovh/manager.git",
8
+ "directory": "packages/manager/modules/common-translations"
9
+ },
10
+ "license": "BSD-3-Clause",
11
+ "author": "OVH SAS",
12
+ "sideEffects": false,
13
+ "main": "./dist/index.cjs.js",
14
+ "module": "./dist/index.esm.js",
15
+ "types": "./dist/types/index.d.ts",
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc && vite build",
21
+ "dev": "tsc && vite build",
22
+ "prepare": "tsc && vite build",
23
+ "start:watch": "tsc -w"
24
+ },
25
+ "devDependencies": {
26
+ "vite": "^5.4.12",
27
+ "vite-plugin-dts": "3.5.1",
28
+ "vite-plugin-static-copy": "^2.0.0"
29
+ }
30
+ }