Show More
@@ -1,172 +1,172 b'' | |||||
1 | .. _system-overview-ref: |
|
1 | .. _system-overview-ref: | |
2 |
|
2 | |||
3 | System Overview |
|
3 | System Overview | |
4 | =============== |
|
4 | =============== | |
5 |
|
5 | |||
6 | Latest Version |
|
6 | Latest Version | |
7 | -------------- |
|
7 | -------------- | |
8 |
|
8 | |||
9 | * |release| on Unix and Windows systems. |
|
9 | * |release| on Unix and Windows systems. | |
10 |
|
10 | |||
11 | System Architecture |
|
11 | System Architecture | |
12 | ------------------- |
|
12 | ------------------- | |
13 |
|
13 | |||
14 | The following diagram shows a typical production architecture. |
|
14 | The following diagram shows a typical production architecture. | |
15 |
|
15 | |||
16 | .. image:: ../images/architecture-diagram.png |
|
16 | .. image:: ../images/architecture-diagram.png | |
17 | :align: center |
|
17 | :align: center | |
18 |
|
18 | |||
19 | Supported Operating Systems |
|
19 | Supported Operating Systems | |
20 | --------------------------- |
|
20 | --------------------------- | |
21 |
|
21 | |||
22 | Linux |
|
22 | Linux | |
23 | ^^^^^ |
|
23 | ^^^^^ | |
24 |
|
24 | |||
25 | * Ubuntu 14.04+ |
|
25 | * Ubuntu 14.04+ | |
26 | * CentOS 6.2, 7 and 8 |
|
26 | * CentOS 6.2, 7 and 8 | |
27 | * RHEL 6.2, 7 and 8 |
|
27 | * RHEL 6.2, 7 and 8 | |
28 | * Debian 7.8 |
|
28 | * Debian 7.8 | |
29 | * RedHat Fedora |
|
29 | * RedHat Fedora | |
30 | * Arch Linux |
|
30 | * Arch Linux | |
31 | * SUSE Linux |
|
31 | * SUSE Linux | |
32 |
|
32 | |||
33 | Windows |
|
33 | Windows | |
34 | ^^^^^^^ |
|
34 | ^^^^^^^ | |
35 |
|
35 | |||
36 | * Windows Vista Ultimate 64bit |
|
36 | * Windows Vista Ultimate 64bit | |
37 | * Windows 7 Ultimate 64bit |
|
37 | * Windows 7 Ultimate 64bit | |
38 | * Windows 8 Professional 64bit |
|
38 | * Windows 8 Professional 64bit | |
39 | * Windows 8.1 Enterprise 64bit |
|
39 | * Windows 8.1 Enterprise 64bit | |
40 | * Windows Server 2008 64bit |
|
40 | * Windows Server 2008 64bit | |
41 | * Windows Server 2008-R2 64bit |
|
41 | * Windows Server 2008-R2 64bit | |
42 | * Windows Server 2012 64bit |
|
42 | * Windows Server 2012 64bit | |
43 |
|
43 | |||
44 | Supported Databases |
|
44 | Supported Databases | |
45 | ------------------- |
|
45 | ------------------- | |
46 |
|
46 | |||
47 | * SQLite |
|
47 | * SQLite | |
48 | * MySQL |
|
48 | * MySQL | |
49 | * MariaDB |
|
49 | * MariaDB | |
50 | * PostgreSQL |
|
50 | * PostgreSQL | |
51 |
|
51 | |||
52 | Supported Browsers |
|
52 | Supported Browsers | |
53 | ------------------ |
|
53 | ------------------ | |
54 |
|
54 | |||
55 | * Chrome |
|
55 | * Chrome | |
56 | * Safari |
|
56 | * Safari | |
57 | * Firefox |
|
57 | * Firefox | |
58 | * Internet Explorer 10 & 11 |
|
58 | * Internet Explorer 10 & 11 | |
59 |
|
59 | |||
60 | System Requirements |
|
60 | System Requirements | |
61 | ------------------- |
|
61 | ------------------- | |
62 |
|
62 | |||
63 | |RCE| performs best on machines with ultra-fast hard disks. Generally disk |
|
63 | |RCE| performs best on machines with ultra-fast hard disks. Generally disk | |
64 | performance is more important than CPU performance. In a corporate production |
|
64 | performance is more important than CPU performance. In a corporate production | |
65 | environment handling 1000s of users and |repos| you should deploy on a 12+ |
|
65 | environment handling 1000s of users and |repos| you should deploy on a 12+ | |
66 | core 64GB RAM server. In short, the more RAM the better. |
|
66 | core 64GB RAM server. In short, the more RAM the better. | |
67 |
|
67 | |||
68 |
|
68 | |||
69 | For example: |
|
69 | For example: | |
70 |
|
70 | |||
71 | - for team of 1 - 5 active users you can run on 1GB RAM machine with 1CPU |
|
71 | - for team of 1 - 5 active users you can run on 1GB RAM machine with 1CPU | |
72 | - above 250 active users, |RCE| needs at least 8GB of memory. |
|
72 | - above 250 active users, |RCE| needs at least 8GB of memory. | |
73 | Number of CPUs is less important, but recommended to have at least 2-3 CPUs |
|
73 | Number of CPUs is less important, but recommended to have at least 2-3 CPUs | |
74 |
|
74 | |||
75 |
|
75 | |||
76 | .. _config-rce-files: |
|
76 | .. _config-rce-files: | |
77 |
|
77 | |||
78 | Configuration Files |
|
78 | Configuration Files | |
79 | ------------------- |
|
79 | ------------------- | |
80 |
|
80 | |||
81 | * :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` |
|
81 | * :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` | |
82 | * :file:`/home/{user}/.rccontrol/{instance-id}/search_mapping.ini` |
|
82 | * :file:`/home/{user}/.rccontrol/{instance-id}/search_mapping.ini` | |
83 | * :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` |
|
83 | * :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.ini` | |
84 | * :file:`/home/{user}/.rccontrol/supervisor/supervisord.ini` |
|
84 | * :file:`/home/{user}/.rccontrol/supervisor/supervisord.ini` | |
85 | * :file:`/home/{user}/.rccontrol.ini` |
|
85 | * :file:`/home/{user}/.rccontrol.ini` | |
86 | * :file:`/home/{user}/.rhoderc` |
|
86 | * :file:`/home/{user}/.rhoderc` | |
87 | * :file:`/home/{user}/.rccontrol/cache/MANIFEST` |
|
87 | * :file:`/home/{user}/.rccontrol/cache/MANIFEST` | |
88 |
|
88 | |||
89 | For more information, see the :ref:`config-files` section. |
|
89 | For more information, see the :ref:`config-files` section. | |
90 |
|
90 | |||
91 | Log Files |
|
91 | Log Files | |
92 | --------- |
|
92 | --------- | |
93 |
|
93 | |||
94 | * :file:`/home/{user}/.rccontrol/{instance-id}/enterprise.log` |
|
94 | * :file:`/home/{user}/.rccontrol/{instance-id}/enterprise.log` | |
95 | * :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.log` |
|
95 | * :file:`/home/{user}/.rccontrol/{vcsserver-id}/vcsserver.log` | |
96 | * :file:`/home/{user}/.rccontrol/supervisor/supervisord.log` |
|
96 | * :file:`/home/{user}/.rccontrol/supervisor/supervisord.log` | |
97 | * :file:`/tmp/rccontrol.log` |
|
97 | * :file:`/tmp/rccontrol.log` | |
98 | * :file:`/tmp/rhodecode_tools.log` |
|
98 | * :file:`/tmp/rhodecode_tools.log` | |
99 |
|
99 | |||
100 | Storage Files |
|
100 | Storage Files | |
101 | ------------- |
|
101 | ------------- | |
102 |
|
102 | |||
103 | * :file:`/home/{user}/.rccontrol/{instance-id}/data/index/{index-file.toc}` |
|
103 | * :file:`/home/{user}/.rccontrol/{instance-id}/data/index/{index-file.toc}` | |
104 | * :file:`/home/{user}/repos/.rc_gist_store` |
|
104 | * :file:`/home/{user}/repos/.rc_gist_store` | |
105 | * :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.db` |
|
105 | * :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.db` | |
106 | * :file:`/opt/rhodecode/store/{unique-hash}` |
|
106 | * :file:`/opt/rhodecode/store/{unique-hash}` | |
107 |
|
107 | |||
108 | Default Repositories Location |
|
108 | Default Repositories Location | |
109 | ----------------------------- |
|
109 | ----------------------------- | |
110 |
|
110 | |||
111 | * :file:`/home/{user}/repos` |
|
111 | * :file:`/home/{user}/repos` | |
112 |
|
112 | |||
113 | Connection Methods |
|
113 | Connection Methods | |
114 | ------------------ |
|
114 | ------------------ | |
115 |
|
115 | |||
116 | * HTTPS |
|
116 | * HTTPS | |
117 | * SSH |
|
117 | * SSH | |
118 | * |RCE| API |
|
118 | * |RCE| API | |
119 |
|
119 | |||
120 | Internationalization Support |
|
120 | Internationalization Support | |
121 | ---------------------------- |
|
121 | ---------------------------- | |
122 |
|
122 | |||
123 | Currently available in the following languages, see `Transifex`_ for the |
|
123 | Currently available in the following languages, see `Transifex`_ for the | |
124 | latest details. If you want a new language added, please contact us. To |
|
124 | latest details. If you want a new language added, please contact us. To | |
125 | configure your language settings, see the :ref:`set-lang` section. |
|
125 | configure your language settings, see the :ref:`set-lang` section. | |
126 |
|
126 | |||
127 | .. hlist:: |
|
127 | .. hlist:: | |
128 |
|
128 | |||
129 | * Belorussian |
|
129 | * Belorussian | |
130 | * Chinese |
|
130 | * Chinese | |
131 | * French |
|
131 | * French | |
132 | * German |
|
132 | * German | |
133 | * Italian |
|
133 | * Italian | |
134 | * Japanese |
|
134 | * Japanese | |
135 | * Portuguese |
|
135 | * Portuguese | |
136 | * Polish |
|
136 | * Polish | |
137 | * Russian |
|
137 | * Russian | |
138 | * Spanish |
|
138 | * Spanish | |
139 |
|
139 | |||
140 | Licencing Information |
|
140 | Licencing Information | |
141 | --------------------- |
|
141 | --------------------- | |
142 |
|
142 | |||
143 | * See licencing information `here`_ |
|
143 | * See licencing information `here`_ | |
144 |
|
144 | |||
145 | Peer-to-peer Failover Support |
|
145 | Peer-to-peer Failover Support | |
146 | ----------------------------- |
|
146 | ----------------------------- | |
147 |
|
147 | |||
148 | * Yes |
|
148 | * Yes | |
149 |
|
149 | |||
150 | Additional Binaries |
|
150 | Additional Binaries | |
151 | ------------------- |
|
151 | ------------------- | |
152 |
|
152 | |||
153 | * Yes, see :ref:`rhodecode-nix-ref` for full details. |
|
153 | * Yes, see :ref:`rhodecode-nix-ref` for full details. | |
154 |
|
154 | |||
155 | Remote Connectivity |
|
155 | Remote Connectivity | |
156 | ------------------- |
|
156 | ------------------- | |
157 |
|
157 | |||
158 | * Available |
|
158 | * Available | |
159 |
|
159 | |||
160 | Executable Files |
|
160 | Executable Files | |
161 | ---------------- |
|
161 | ---------------- | |
162 |
|
162 | |||
163 | Windows: :file:`RhodeCode-installer-{version}.exe` |
|
163 | Windows: :file:`RhodeCode-installer-{version}.exe` | |
164 |
|
164 | |||
165 | Deprecated Support |
|
165 | Deprecated Support | |
166 | ------------------ |
|
166 | ------------------ | |
167 |
|
167 | |||
168 | - Internet Explorer 8 support deprecated since version 3.7.0. |
|
168 | - Internet Explorer 8 support deprecated since version 3.7.0. | |
169 | - Internet Explorer 9 support deprecated since version 3.8.0. |
|
169 | - Internet Explorer 9 support deprecated since version 3.8.0. | |
170 |
|
170 | |||
171 | .. _here: https://rhodecode.com/licenses/ |
|
171 | .. _here: https://rhodecode.com/licenses/ | |
172 |
.. _Transifex: https:// |
|
172 | .. _Transifex: https://explore.transifex.com/rhodecode/RhodeCode/ |
@@ -1,106 +1,106 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | # Copyright (C) 2010-2020 RhodeCode GmbH |
|
3 | # Copyright (C) 2010-2020 RhodeCode GmbH | |
4 | # |
|
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify |
|
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
7 | # (only), as published by the Free Software Foundation. |
|
7 | # (only), as published by the Free Software Foundation. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU Affero General Public License |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | # |
|
16 | # | |
17 | # This program is dual-licensed. If you wish to learn more about the |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
20 |
|
20 | |||
21 | """ |
|
21 | """ | |
22 | Single source for redirection links. |
|
22 | Single source for redirection links. | |
23 |
|
23 | |||
24 | Goal of this module is to provide a single source of truth regarding external |
|
24 | Goal of this module is to provide a single source of truth regarding external | |
25 | links. The data inside this module is used to configure the routing |
|
25 | links. The data inside this module is used to configure the routing | |
26 | system of Enterprise and it is used also as a base to check if this data |
|
26 | system of Enterprise and it is used also as a base to check if this data | |
27 | and our server configuration are in sync. |
|
27 | and our server configuration are in sync. | |
28 |
|
28 | |||
29 | .. py:data:: link_config |
|
29 | .. py:data:: link_config | |
30 |
|
30 | |||
31 | Contains the configuration for external links. Each item is supposed to be |
|
31 | Contains the configuration for external links. Each item is supposed to be | |
32 | a `dict` like this example:: |
|
32 | a `dict` like this example:: | |
33 |
|
33 | |||
34 | {"name": "url_name", |
|
34 | {"name": "url_name", | |
35 | "target": "https://rhodecode.com/r1/enterprise/keyword/", |
|
35 | "target": "https://rhodecode.com/r1/enterprise/keyword/", | |
36 | "external_target": "https://example.com/some-page.html", |
|
36 | "external_target": "https://example.com/some-page.html", | |
37 | } |
|
37 | } | |
38 |
|
38 | |||
39 | then you can retrieve the url by simply calling the URL function: |
|
39 | then you can retrieve the url by simply calling the URL function: | |
40 |
|
40 | |||
41 | `h.route_path('url_name')` |
|
41 | `h.route_path('url_name')` | |
42 |
|
42 | |||
43 | The redirection must be first implemented in our servers before |
|
43 | The redirection must be first implemented in our servers before | |
44 | you can see it working. |
|
44 | you can see it working. | |
45 | """ |
|
45 | """ | |
46 | # pragma: no cover |
|
46 | # pragma: no cover | |
47 | from __future__ import unicode_literals |
|
47 | from __future__ import unicode_literals | |
48 |
|
48 | |||
49 | link_config = [ |
|
49 | link_config = [ | |
50 | { |
|
50 | { | |
51 | "name": "enterprise_docs", |
|
51 | "name": "enterprise_docs", | |
52 | "target": "https://rhodecode.com/r1/enterprise/docs/", |
|
52 | "target": "https://rhodecode.com/r1/enterprise/docs/", | |
53 | "external_target": "https://docs.rhodecode.com/RhodeCode-Enterprise/", |
|
53 | "external_target": "https://docs.rhodecode.com/RhodeCode-Enterprise/", | |
54 | }, |
|
54 | }, | |
55 | { |
|
55 | { | |
56 | "name": "enterprise_log_file_locations", |
|
56 | "name": "enterprise_log_file_locations", | |
57 | "target": "https://rhodecode.com/r1/enterprise/docs/admin-system-overview/", |
|
57 | "target": "https://rhodecode.com/r1/enterprise/docs/admin-system-overview/", | |
58 | "external_target": "https://docs.rhodecode.com/RhodeCode-Enterprise/admin/system-overview.html#log-files", |
|
58 | "external_target": "https://docs.rhodecode.com/RhodeCode-Enterprise/admin/system-overview.html#log-files", | |
59 | }, |
|
59 | }, | |
60 | { |
|
60 | { | |
61 | "name": "enterprise_issue_tracker_settings", |
|
61 | "name": "enterprise_issue_tracker_settings", | |
62 | "target": "https://rhodecode.com/r1/enterprise/docs/issue-trackers-overview/", |
|
62 | "target": "https://rhodecode.com/r1/enterprise/docs/issue-trackers-overview/", | |
63 | "external_target": "https://docs.rhodecode.com/RhodeCode-Enterprise/issue-trackers/issue-trackers.html", |
|
63 | "external_target": "https://docs.rhodecode.com/RhodeCode-Enterprise/issue-trackers/issue-trackers.html", | |
64 | }, |
|
64 | }, | |
65 | { |
|
65 | { | |
66 | "name": "enterprise_svn_setup", |
|
66 | "name": "enterprise_svn_setup", | |
67 | "target": "https://rhodecode.com/r1/enterprise/docs/svn-setup/", |
|
67 | "target": "https://rhodecode.com/r1/enterprise/docs/svn-setup/", | |
68 | "external_target": "https://docs.rhodecode.com/RhodeCode-Enterprise/admin/svn-http.html", |
|
68 | "external_target": "https://docs.rhodecode.com/RhodeCode-Enterprise/admin/svn-http.html", | |
69 | }, |
|
69 | }, | |
70 | { |
|
70 | { | |
71 | "name": "enterprise_license_convert_from_old", |
|
71 | "name": "enterprise_license_convert_from_old", | |
72 | "target": "https://rhodecode.com/r1/enterprise/convert-license/", |
|
72 | "target": "https://rhodecode.com/r1/enterprise/convert-license/", | |
73 | "external_target": "https://rhodecode.com/u/license-upgrade", |
|
73 | "external_target": "https://rhodecode.com/u/license-upgrade", | |
74 | }, |
|
74 | }, | |
75 | { |
|
75 | { | |
76 | "name": "rst_help", |
|
76 | "name": "rst_help", | |
77 | "target": "http://docutils.sourceforge.io/docs/user/rst/quickref.html", |
|
77 | "target": "http://docutils.sourceforge.io/docs/user/rst/quickref.html", | |
78 | "external_target": "https://docutils.sourceforge.io/docs/user/rst/quickref.html", |
|
78 | "external_target": "https://docutils.sourceforge.io/docs/user/rst/quickref.html", | |
79 | }, |
|
79 | }, | |
80 | { |
|
80 | { | |
81 | "name": "markdown_help", |
|
81 | "name": "markdown_help", | |
82 | "target": "https://daringfireball.net/projects/markdown/syntax", |
|
82 | "target": "https://daringfireball.net/projects/markdown/syntax", | |
83 | "external_target": "https://daringfireball.net/projects/markdown/syntax", |
|
83 | "external_target": "https://daringfireball.net/projects/markdown/syntax", | |
84 | }, |
|
84 | }, | |
85 | { |
|
85 | { | |
86 | "name": "rhodecode_official", |
|
86 | "name": "rhodecode_official", | |
87 | "target": "https://rhodecode.com", |
|
87 | "target": "https://rhodecode.com", | |
88 | "external_target": "https://rhodecode.com/", |
|
88 | "external_target": "https://rhodecode.com/", | |
89 | }, |
|
89 | }, | |
90 | { |
|
90 | { | |
91 | "name": "rhodecode_support", |
|
91 | "name": "rhodecode_support", | |
92 | "target": "https://rhodecode.com/help/", |
|
92 | "target": "https://rhodecode.com/help/", | |
93 | "external_target": "https://rhodecode.com/support", |
|
93 | "external_target": "https://rhodecode.com/support", | |
94 | }, |
|
94 | }, | |
95 | { |
|
95 | { | |
96 | "name": "rhodecode_translations", |
|
96 | "name": "rhodecode_translations", | |
97 | "target": "https://rhodecode.com/translate/enterprise", |
|
97 | "target": "https://rhodecode.com/translate/enterprise", | |
98 |
"external_target": "https:// |
|
98 | "external_target": "https://explore.transifex.com/rhodecode/RhodeCode/", | |
99 | }, |
|
99 | }, | |
100 |
|
100 | |||
101 | ] |
|
101 | ] | |
102 |
|
102 | |||
103 |
|
103 | |||
104 | def connect_redirection_links(config): |
|
104 | def connect_redirection_links(config): | |
105 | for link in link_config: |
|
105 | for link in link_config: | |
106 | config.add_route(link['name'], link['target'], static=True) |
|
106 | config.add_route(link['name'], link['target'], static=True) |
@@ -1,136 +1,136 b'' | |||||
1 | ########################## |
|
1 | ########################## | |
2 | To create a new language |
|
2 | To create a new language | |
3 | ########################## |
|
3 | ########################## | |
4 |
|
4 | |||
5 | Translations are available on transifex under:: |
|
5 | Translations are available on transifex under:: | |
6 |
|
6 | |||
7 |
https:// |
|
7 | https://explore.transifex.com/rhodecode/RhodeCode/ | |
8 |
|
8 | |||
9 | Log into transifex and request new language translation. |
|
9 | Log into transifex and request new language translation. | |
10 |
|
10 | |||
11 | manual creation of new language |
|
11 | manual creation of new language | |
12 | +++++++++++++++++++++++++++++++ |
|
12 | +++++++++++++++++++++++++++++++ | |
13 |
|
13 | |||
14 | **Step 1:** If you don't have a dev environment set up, download sources of |
|
14 | **Step 1:** If you don't have a dev environment set up, download sources of | |
15 | RhodeCode. Run:: |
|
15 | RhodeCode. Run:: | |
16 |
|
16 | |||
17 | python setup.py develop |
|
17 | python setup.py develop | |
18 |
|
18 | |||
19 | Otherwise, update to the latest stable commit. |
|
19 | Otherwise, update to the latest stable commit. | |
20 |
|
20 | |||
21 |
|
21 | |||
22 | **Note:** The following commands are intended to be run in the main repo directory |
|
22 | **Note:** The following commands are intended to be run in the main repo directory | |
23 | using Linux; running them in nix-shell is fine. |
|
23 | using Linux; running them in nix-shell is fine. | |
24 |
|
24 | |||
25 |
|
25 | |||
26 | **Step 2:** Make sure all translation strings are extracted by running:: |
|
26 | **Step 2:** Make sure all translation strings are extracted by running:: | |
27 |
|
27 | |||
28 | python setup.py extract_messages |
|
28 | python setup.py extract_messages | |
29 |
|
29 | |||
30 |
|
30 | |||
31 | **Step 3:** Create a new language by executing following command:: |
|
31 | **Step 3:** Create a new language by executing following command:: | |
32 |
|
32 | |||
33 | python setup.py init_catalog -l <new_language_code> |
|
33 | python setup.py init_catalog -l <new_language_code> | |
34 |
|
34 | |||
35 | This creates a new language under directory rhodecode/i18n/<new_language_code> |
|
35 | This creates a new language under directory rhodecode/i18n/<new_language_code> | |
36 |
|
36 | |||
37 |
|
37 | |||
38 | **Step 4:** Be sure to update transifex mapping, located at rhodecode/.tx/config |
|
38 | **Step 4:** Be sure to update transifex mapping, located at rhodecode/.tx/config | |
39 | The path to the new language should be identical to the others, instead using |
|
39 | The path to the new language should be identical to the others, instead using | |
40 | the new language code. |
|
40 | the new language code. | |
41 |
|
41 | |||
42 |
|
42 | |||
43 | **Step 5:** Verify the translation file and fix any errors. |
|
43 | **Step 5:** Verify the translation file and fix any errors. | |
44 | This can be done by executing:: |
|
44 | This can be done by executing:: | |
45 |
|
45 | |||
46 | msgfmt -f -c rhodecode/i18n/<new_language_code>/LC_MESSAGES/<updated_file.po> |
|
46 | msgfmt -f -c rhodecode/i18n/<new_language_code>/LC_MESSAGES/<updated_file.po> | |
47 |
|
47 | |||
48 | Edit rhodecode/i18n/<new_language_code>/LC_MESSAGES/rhodecode.po for errors |
|
48 | Edit rhodecode/i18n/<new_language_code>/LC_MESSAGES/rhodecode.po for errors | |
49 | with your favorite file editor (the errors will tell you what's missing, check |
|
49 | with your favorite file editor (the errors will tell you what's missing, check | |
50 | other rhodecode.po files in existing languages for clues). |
|
50 | other rhodecode.po files in existing languages for clues). | |
51 |
|
51 | |||
52 |
|
52 | |||
53 | **Step 6:** Finally, compile the translations:: |
|
53 | **Step 6:** Finally, compile the translations:: | |
54 |
|
54 | |||
55 | python setup.py compile_catalog -l <new_language_code> |
|
55 | python setup.py compile_catalog -l <new_language_code> | |
56 |
|
56 | |||
57 | **Note:** Make sure there is not a .mo file in the top-level folder! |
|
57 | **Note:** Make sure there is not a .mo file in the top-level folder! | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | ########################## |
|
60 | ########################## | |
61 | To update translations |
|
61 | To update translations | |
62 | ########################## |
|
62 | ########################## | |
63 |
|
63 | |||
64 | **Note:** This is a different process, not needed when you are adding a translation. |
|
64 | **Note:** This is a different process, not needed when you are adding a translation. | |
65 |
|
65 | |||
66 | **Step 1:** Fetch the latest version of strings for translation by running:: |
|
66 | **Step 1:** Fetch the latest version of strings for translation by running:: | |
67 |
|
67 | |||
68 | python setup.py extract_messages |
|
68 | python setup.py extract_messages | |
69 |
|
69 | |||
70 |
|
70 | |||
71 | **Step 2:** Update the rhodecode.po file using:: |
|
71 | **Step 2:** Update the rhodecode.po file using:: | |
72 |
|
72 | |||
73 | python setup.py update_catalog -l <new_language_code> |
|
73 | python setup.py update_catalog -l <new_language_code> | |
74 |
|
74 | |||
75 |
|
75 | |||
76 | **Step 3:** Update the po file as outlined in step 5 for new translations (see above). |
|
76 | **Step 3:** Update the po file as outlined in step 5 for new translations (see above). | |
77 |
|
77 | |||
78 |
|
78 | |||
79 | **Step 4:** Compile the translations as outlined in step 6 for new translations (see above). |
|
79 | **Step 4:** Compile the translations as outlined in step 6 for new translations (see above). | |
80 |
|
80 | |||
81 | **Note:** Make sure there is not a .mo file in the top-level folder! |
|
81 | **Note:** Make sure there is not a .mo file in the top-level folder! | |
82 |
|
82 | |||
83 |
|
83 | |||
84 | ########################### |
|
84 | ########################### | |
85 | Javascript translations |
|
85 | Javascript translations | |
86 | ########################### |
|
86 | ########################### | |
87 |
|
87 | |||
88 | First find all translation used in JS by running the command: |
|
88 | First find all translation used in JS by running the command: | |
89 |
|
89 | |||
90 | grep "_TM\[.*\]" -R . -oh | sort -u |
|
90 | grep "_TM\[.*\]" -R . -oh | sort -u | |
91 |
|
91 | |||
92 | Then compare it against the file scripts/tasks/file_generation/js_i18n_data.py. |
|
92 | Then compare it against the file scripts/tasks/file_generation/js_i18n_data.py. | |
93 | Add or remove strings to that file remembering to add them surrounded by _(...), |
|
93 | Add or remove strings to that file remembering to add them surrounded by _(...), | |
94 | or otherwise they won't get added to the catalog. |
|
94 | or otherwise they won't get added to the catalog. | |
95 |
|
95 | |||
96 | In case the file changed, regenereate the catalog by following the |
|
96 | In case the file changed, regenereate the catalog by following the | |
97 | instructions above ('to update translations'). |
|
97 | instructions above ('to update translations'). | |
98 |
|
98 | |||
99 | Once the new strings were transalated and the catalogs comiled with msgfmt, you |
|
99 | Once the new strings were transalated and the catalogs comiled with msgfmt, you | |
100 | can generate the Javascript translation files. To do so, just run the command: |
|
100 | can generate the Javascript translation files. To do so, just run the command: | |
101 |
|
101 | |||
102 | invoke -r scripts/ generate.js-i18n |
|
102 | invoke -r scripts/ generate.js-i18n | |
103 |
|
103 | |||
104 | Which will generate one JS file for detected language in the folder |
|
104 | Which will generate one JS file for detected language in the folder | |
105 | rhodecode/public/js/rhodecode/i18n/{lang}.js |
|
105 | rhodecode/public/js/rhodecode/i18n/{lang}.js | |
106 |
|
106 | |||
107 | Finally, commit the changes. |
|
107 | Finally, commit the changes. | |
108 |
|
108 | |||
109 |
|
109 | |||
110 | ######################## |
|
110 | ######################## | |
111 | Testing translations |
|
111 | Testing translations | |
112 | ######################## |
|
112 | ######################## | |
113 |
|
113 | |||
114 | Edit the test.ini file, setting the lang attribute to:: |
|
114 | Edit the test.ini file, setting the lang attribute to:: | |
115 |
|
115 | |||
116 | lang=<new_language_code> |
|
116 | lang=<new_language_code> | |
117 |
|
117 | |||
118 | Run RhodeCode tests by executing:: |
|
118 | Run RhodeCode tests by executing:: | |
119 |
|
119 | |||
120 | nosetests |
|
120 | nosetests | |
121 |
|
121 | |||
122 | ########################### |
|
122 | ########################### | |
123 | Workflow for Transifex |
|
123 | Workflow for Transifex | |
124 | ########################### |
|
124 | ########################### | |
125 |
|
125 | |||
126 | #0 new language: |
|
126 | #0 new language: | |
127 | edit .tx/config and add language |
|
127 | edit .tx/config and add language | |
128 | #1 extract messages to generate updated pot file |
|
128 | #1 extract messages to generate updated pot file | |
129 | python setup.py extract_messages |
|
129 | python setup.py extract_messages | |
130 | #2 push source .pot file to Transifex |
|
130 | #2 push source .pot file to Transifex | |
131 | tx push -s |
|
131 | tx push -s | |
132 | #3 when translations are ok pull changes |
|
132 | #3 when translations are ok pull changes | |
133 | tx pull |
|
133 | tx pull | |
134 | #4 compile languages |
|
134 | #4 compile languages | |
135 | python setup.py compile_catalog |
|
135 | python setup.py compile_catalog | |
136 |
|
136 |
General Comments 0
You need to be logged in to leave comments.
Login now