forked from inveniosoftware/react-invenio-deposit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig
41 lines (37 loc) · 1.29 KB
/
config
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
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 CERN.
# Copyright (C) 2021 Graz University of Technology.
#
# React-Invenio-Deposit is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
# 1) Add a new language
# npm run init_catalog lang <lang>
# 2) Extract translation keys/values
# $ npm run extract_messages
# 3) Update the src/lib/translations/messages/index.js file
# import TRANSLATE_<lang> from './<lang>/translations.json'
# export const translations = {
# ...rest,
# <lang>: { translation: TRANSLATE_<lang> }
# }
# 4) Install the transifex-client
# $ pip install transifex-client
# 5) Push source (.pot) and translations (.po) to Transifex
# $ tx push -s -t
# 6) Pull translations for a single language from Transifex
# $ tx pull -l <lang>
# 7) Pull translations for all languages from Transifex
# $ tx pull -a
# 8) Compile .po files for all languages
# $ npm run compile_catalog
# 9) Convert .po file for a single language
# $ npm run compile_catalog lang <lang>
[main]
host = https://www.transifex.com
[invenio.react-invenio-deposit-messages]
file_filter = src/lib/translations/messages/<lang>/messages.po
source_file = src/lib/translations/translations.pot
source_lang = en
type = PO