Fix locale installation

Julien LepillerSat Oct 13 12:07:36+0200 2018

e2fe8f6

Fix locale installation

Makefile

3232
3333
update-langs:
3434
	for l in $(LANGS); do \
35-
		pylupdate5 offlate/*.py -ts i18n/offlate_$${l}.ts ;\
36-
		lrelease i18n/offlate_$${l}.ts ;\
35+
		pylupdate5 offlate/*.py -ts offlate/locales/offlate_$${l}.ts ;\
36+
		lrelease offlate/locales/offlate_$${l}.ts ;\
3737
	done

i18n/offlate_fr.ts unknown status 2

1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!DOCTYPE TS><TS version="2.0">
3-
<context>
4-
    <name>NewWindow</name>
5-
    <message>
6-
        <location filename="../offlate/window.py" line="244"/>
7-
        <source>The Translation Project</source>
8-
        <translation>Le Projet de Traduction</translation>
9-
    </message>
10-
    <message>
11-
        <location filename="../offlate/window.py" line="252"/>
12-
        <source>Cancel</source>
13-
        <translation>Annuler</translation>
14-
    </message>
15-
    <message>
16-
        <location filename="../offlate/window.py" line="253"/>
17-
        <source>OK</source>
18-
        <translation>OK</translation>
19-
    </message>
20-
    <message>
21-
        <location filename="../offlate/window.py" line="235"/>
22-
        <source>Project information</source>
23-
        <translation>Informations sur le projet</translation>
24-
    </message>
25-
    <message>
26-
        <location filename="../offlate/window.py" line="241"/>
27-
        <source>Name:</source>
28-
        <translation>Nom :</translation>
29-
    </message>
30-
    <message>
31-
        <location filename="../offlate/window.py" line="242"/>
32-
        <source>Target Language:</source>
33-
        <translation>Langue cible :</translation>
34-
    </message>
35-
    <message>
36-
        <location filename="../offlate/window.py" line="245"/>
37-
        <source>Transifex</source>
38-
        <translation>Transifex</translation>
39-
    </message>
40-
    <message>
41-
        <location filename="../offlate/window.py" line="267"/>
42-
        <source>Organization</source>
43-
        <translation>Organisation</translation>
44-
    </message>
45-
</context>
46-
<context>
47-
    <name>ProjectView</name>
48-
    <message>
49-
        <location filename="../offlate/window.py" line="137"/>
50-
        <source>Singular</source>
51-
        <translation>Singulier</translation>
52-
    </message>
53-
    <message>
54-
        <location filename="../offlate/window.py" line="138"/>
55-
        <source>Plural</source>
56-
        <translation>Pluriel</translation>
57-
    </message>
58-
</context>
59-
<context>
60-
    <name>SettingsWindow</name>
61-
    <message>
62-
        <location filename="../offlate/window.py" line="358"/>
63-
        <source>Cancel</source>
64-
        <translation>Annuler</translation>
65-
    </message>
66-
    <message>
67-
        <location filename="../offlate/window.py" line="359"/>
68-
        <source>OK</source>
69-
        <translation>OK</translation>
70-
    </message>
71-
    <message>
72-
        <location filename="../offlate/window.py" line="424"/>
73-
        <source>Email:</source>
74-
        <translation>Adresse de courriel :</translation>
75-
    </message>
76-
    <message>
77-
        <location filename="../offlate/window.py" line="425"/>
78-
        <source>Server:</source>
79-
        <translation>Serveur :</translation>
80-
    </message>
81-
    <message>
82-
        <location filename="../offlate/window.py" line="426"/>
83-
        <source>User Name:</source>
84-
        <translation>Nom d&apos;utilisateur :</translation>
85-
    </message>
86-
    <message>
87-
        <location filename="../offlate/window.py" line="370"/>
88-
        <source>Transifex</source>
89-
        <translation>Transifex</translation>
90-
    </message>
91-
    <message>
92-
        <location filename="../offlate/window.py" line="382"/>
93-
        <source>You can get a token from &lt;a href=&quot;#&quot;&gt;https://www.transifex.com/user/settings/api/&lt;/a&gt;</source>
94-
        <translation>Vous pouvez r??cup??rer un jeton sur &lt;a href=&quot;#&quot;&gt;https://www.transifex.com/user/settings/api/&lt;/a&gt;</translation>
95-
    </message>
96-
    <message>
97-
        <location filename="../offlate/window.py" line="385"/>
98-
        <source>Token:</source>
99-
        <translation>Jeton :</translation>
100-
    </message>
101-
    <message>
102-
        <location filename="../offlate/window.py" line="399"/>
103-
        <source>Translation Project</source>
104-
        <translation>Projet de traduction</translation>
105-
    </message>
106-
    <message>
107-
        <location filename="../offlate/window.py" line="427"/>
108-
        <source>Full Name (John Doe &lt;john@doe.me&gt;):</source>
109-
        <translation>Nom complet (Jean Dupont &lt;jean@dupont.me&gt;) :</translation>
110-
    </message>
111-
</context>
112-
<context>
113-
    <name>SpellCheckEdit</name>
114-
    <message>
115-
        <location filename="../offlate/spellcheckedit.py" line="27"/>
116-
        <source>Spelling Suggestions</source>
117-
        <translation>Suggestions</translation>
118-
    </message>
119-
    <message>
120-
        <location filename="../offlate/spellcheckedit.py" line="28"/>
121-
        <source>No Suggestions</source>
122-
        <translation>Pas de suggestion</translation>
123-
    </message>
124-
</context>
125-
<context>
126-
    <name>Window</name>
127-
    <message>
128-
        <location filename="../offlate/window.py" line="527"/>
129-
        <source>Exit application</source>
130-
        <translation>Quitter l&apos;application</translation>
131-
    </message>
132-
    <message>
133-
        <location filename="../offlate/window.py" line="532"/>
134-
        <source>Save current project</source>
135-
        <translation>Sauvegarder le projet actuel</translation>
136-
    </message>
137-
    <message>
138-
        <location filename="../offlate/window.py" line="537"/>
139-
        <source>New project</source>
140-
        <translation>Nouveau projet</translation>
141-
    </message>
142-
    <message>
143-
        <location filename="../offlate/window.py" line="542"/>
144-
        <source>Get modifications from upstream</source>
145-
        <translation>R??cup??rer les modifications en amont</translation>
146-
    </message>
147-
    <message>
148-
        <location filename="../offlate/window.py" line="546"/>
149-
        <source>Close current project</source>
150-
        <translation>Fermer le projet actuel</translation>
151-
    </message>
152-
    <message>
153-
        <location filename="../offlate/window.py" line="551"/>
154-
        <source>Send modifications upstream</source>
155-
        <translation>Envoyer les modifications en amont</translation>
156-
    </message>
157-
    <message>
158-
        <location filename="../offlate/window.py" line="556"/>
159-
        <source>Set parameters</source>
160-
        <translation>Configurer les param??tres</translation>
161-
    </message>
162-
    <message>
163-
        <location filename="../offlate/window.py" line="559"/>
164-
        <source>Show Translated</source>
165-
        <translation>Montrer traduites</translation>
166-
    </message>
167-
    <message>
168-
        <location filename="../offlate/window.py" line="562"/>
169-
        <source>Show Fuzzy</source>
170-
        <translation>Montrer floues</translation>
171-
    </message>
172-
    <message>
173-
        <location filename="../offlate/window.py" line="565"/>
174-
        <source>Show Empty Translation</source>
175-
        <translation>Montrer les traductions vides</translation>
176-
    </message>
177-
    <message>
178-
        <location filename="../offlate/window.py" line="583"/>
179-
        <source>&amp;File</source>
180-
        <translation>&amp;Fichier</translation>
181-
    </message>
182-
    <message>
183-
        <location filename="../offlate/window.py" line="589"/>
184-
        <source>&amp;Project</source>
185-
        <translation>&amp;Projet</translation>
186-
    </message>
187-
    <message>
188-
        <location filename="../offlate/window.py" line="596"/>
189-
        <source>&amp;Edit</source>
190-
        <translation>&amp;??dition</translation>
191-
    </message>
192-
    <message>
193-
        <location filename="../offlate/window.py" line="599"/>
194-
        <source>&amp;View</source>
195-
        <translation>&amp;Affichage</translation>
196-
    </message>
197-
    <message>
198-
        <location filename="../offlate/window.py" line="579"/>
199-
        <source>Open</source>
200-
        <translation>Ouvrir</translation>
201-
    </message>
202-
    <message>
203-
        <location filename="../offlate/window.py" line="525"/>
204-
        <source>Exit</source>
205-
        <translation>Quitter</translation>
206-
    </message>
207-
    <message>
208-
        <location filename="../offlate/window.py" line="530"/>
209-
        <source>Save</source>
210-
        <translation>Sauvegarder</translation>
211-
    </message>
212-
    <message>
213-
        <location filename="../offlate/window.py" line="535"/>
214-
        <source>New</source>
215-
        <translation>Nouveau</translation>
216-
    </message>
217-
    <message>
218-
        <location filename="../offlate/window.py" line="540"/>
219-
        <source>Update</source>
220-
        <translation>Mettre ?? jour</translation>
221-
    </message>
222-
    <message>
223-
        <location filename="../offlate/window.py" line="545"/>
224-
        <source>Close</source>
225-
        <translation>Fermer</translation>
226-
    </message>
227-
    <message>
228-
        <location filename="../offlate/window.py" line="549"/>
229-
        <source>Send</source>
230-
        <translation>Envoyer</translation>
231-
    </message>
232-
    <message>
233-
        <location filename="../offlate/window.py" line="554"/>
234-
        <source>Settings</source>
235-
        <translation>Param??tres</translation>
236-
    </message>
237-
    <message>
238-
        <location filename="../offlate/window.py" line="568"/>
239-
        <source>Use a monospace font</source>
240-
        <translation type="unfinished"></translation>
241-
    </message>
242-
    <message>
243-
        <location filename="../offlate/window.py" line="478"/>
244-
        <source>{} translated on {} total ({}%).</source>
245-
        <translation type="unfinished"></translation>
246-
    </message>
247-
</context>
248-
<context>
249-
    <name>self.qd</name>
250-
    <message>
251-
        <location filename="../offlate/window.py" line="27"/>
252-
        <source>Please enter your password:</source>
253-
        <translation>Veuillez entrer votre mot de passe :</translation>
254-
    </message>
255-
</context>
256-
</TS>

offlate/locales/offlate_fr.ts unknown status 1

1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!DOCTYPE TS><TS version="2.0">
3+
<context>
4+
    <name>NewWindow</name>
5+
    <message>
6+
        <location filename="../offlate/window.py" line="244"/>
7+
        <source>The Translation Project</source>
8+
        <translation>Le Projet de Traduction</translation>
9+
    </message>
10+
    <message>
11+
        <location filename="../offlate/window.py" line="252"/>
12+
        <source>Cancel</source>
13+
        <translation>Annuler</translation>
14+
    </message>
15+
    <message>
16+
        <location filename="../offlate/window.py" line="253"/>
17+
        <source>OK</source>
18+
        <translation>OK</translation>
19+
    </message>
20+
    <message>
21+
        <location filename="../offlate/window.py" line="235"/>
22+
        <source>Project information</source>
23+
        <translation>Informations sur le projet</translation>
24+
    </message>
25+
    <message>
26+
        <location filename="../offlate/window.py" line="241"/>
27+
        <source>Name:</source>
28+
        <translation>Nom :</translation>
29+
    </message>
30+
    <message>
31+
        <location filename="../offlate/window.py" line="242"/>
32+
        <source>Target Language:</source>
33+
        <translation>Langue cible :</translation>
34+
    </message>
35+
    <message>
36+
        <location filename="../offlate/window.py" line="245"/>
37+
        <source>Transifex</source>
38+
        <translation>Transifex</translation>
39+
    </message>
40+
    <message>
41+
        <location filename="../offlate/window.py" line="267"/>
42+
        <source>Organization</source>
43+
        <translation>Organisation</translation>
44+
    </message>
45+
</context>
46+
<context>
47+
    <name>ProjectView</name>
48+
    <message>
49+
        <location filename="../offlate/window.py" line="137"/>
50+
        <source>Singular</source>
51+
        <translation>Singulier</translation>
52+
    </message>
53+
    <message>
54+
        <location filename="../offlate/window.py" line="138"/>
55+
        <source>Plural</source>
56+
        <translation>Pluriel</translation>
57+
    </message>
58+
</context>
59+
<context>
60+
    <name>SettingsWindow</name>
61+
    <message>
62+
        <location filename="../offlate/window.py" line="358"/>
63+
        <source>Cancel</source>
64+
        <translation>Annuler</translation>
65+
    </message>
66+
    <message>
67+
        <location filename="../offlate/window.py" line="359"/>
68+
        <source>OK</source>
69+
        <translation>OK</translation>
70+
    </message>
71+
    <message>
72+
        <location filename="../offlate/window.py" line="424"/>
73+
        <source>Email:</source>
74+
        <translation>Adresse de courriel :</translation>
75+
    </message>
76+
    <message>
77+
        <location filename="../offlate/window.py" line="425"/>
78+
        <source>Server:</source>
79+
        <translation>Serveur :</translation>
80+
    </message>
81+
    <message>
82+
        <location filename="../offlate/window.py" line="426"/>
83+
        <source>User Name:</source>
84+
        <translation>Nom d&apos;utilisateur :</translation>
85+
    </message>
86+
    <message>
87+
        <location filename="../offlate/window.py" line="370"/>
88+
        <source>Transifex</source>
89+
        <translation>Transifex</translation>
90+
    </message>
91+
    <message>
92+
        <location filename="../offlate/window.py" line="382"/>
93+
        <source>You can get a token from &lt;a href=&quot;#&quot;&gt;https://www.transifex.com/user/settings/api/&lt;/a&gt;</source>
94+
        <translation>Vous pouvez r??cup??rer un jeton sur &lt;a href=&quot;#&quot;&gt;https://www.transifex.com/user/settings/api/&lt;/a&gt;</translation>
95+
    </message>
96+
    <message>
97+
        <location filename="../offlate/window.py" line="385"/>
98+
        <source>Token:</source>
99+
        <translation>Jeton :</translation>
100+
    </message>
101+
    <message>
102+
        <location filename="../offlate/window.py" line="399"/>
103+
        <source>Translation Project</source>
104+
        <translation>Projet de traduction</translation>
105+
    </message>
106+
    <message>
107+
        <location filename="../offlate/window.py" line="427"/>
108+
        <source>Full Name (John Doe &lt;john@doe.me&gt;):</source>
109+
        <translation>Nom complet (Jean Dupont &lt;jean@dupont.me&gt;) :</translation>
110+
    </message>
111+
</context>
112+
<context>
113+
    <name>SpellCheckEdit</name>
114+
    <message>
115+
        <location filename="../offlate/spellcheckedit.py" line="27"/>
116+
        <source>Spelling Suggestions</source>
117+
        <translation>Suggestions</translation>
118+
    </message>
119+
    <message>
120+
        <location filename="../offlate/spellcheckedit.py" line="28"/>
121+
        <source>No Suggestions</source>
122+
        <translation>Pas de suggestion</translation>
123+
    </message>
124+
</context>
125+
<context>
126+
    <name>Window</name>
127+
    <message>
128+
        <location filename="../offlate/window.py" line="527"/>
129+
        <source>Exit application</source>
130+
        <translation>Quitter l&apos;application</translation>
131+
    </message>
132+
    <message>
133+
        <location filename="../offlate/window.py" line="532"/>
134+
        <source>Save current project</source>
135+
        <translation>Sauvegarder le projet actuel</translation>
136+
    </message>
137+
    <message>
138+
        <location filename="../offlate/window.py" line="537"/>
139+
        <source>New project</source>
140+
        <translation>Nouveau projet</translation>
141+
    </message>
142+
    <message>
143+
        <location filename="../offlate/window.py" line="542"/>
144+
        <source>Get modifications from upstream</source>
145+
        <translation>R??cup??rer les modifications en amont</translation>
146+
    </message>
147+
    <message>
148+
        <location filename="../offlate/window.py" line="546"/>
149+
        <source>Close current project</source>
150+
        <translation>Fermer le projet actuel</translation>
151+
    </message>
152+
    <message>
153+
        <location filename="../offlate/window.py" line="551"/>
154+
        <source>Send modifications upstream</source>
155+
        <translation>Envoyer les modifications en amont</translation>
156+
    </message>
157+
    <message>
158+
        <location filename="../offlate/window.py" line="556"/>
159+
        <source>Set parameters</source>
160+
        <translation>Configurer les param??tres</translation>
161+
    </message>
162+
    <message>
163+
        <location filename="../offlate/window.py" line="559"/>
164+
        <source>Show Translated</source>
165+
        <translation>Montrer traduites</translation>
166+
    </message>
167+
    <message>
168+
        <location filename="../offlate/window.py" line="562"/>
169+
        <source>Show Fuzzy</source>
170+
        <translation>Montrer floues</translation>
171+
    </message>
172+
    <message>
173+
        <location filename="../offlate/window.py" line="565"/>
174+
        <source>Show Empty Translation</source>
175+
        <translation>Montrer les traductions vides</translation>
176+
    </message>
177+
    <message>
178+
        <location filename="../offlate/window.py" line="583"/>
179+
        <source>&amp;File</source>
180+
        <translation>&amp;Fichier</translation>
181+
    </message>
182+
    <message>
183+
        <location filename="../offlate/window.py" line="589"/>
184+
        <source>&amp;Project</source>
185+
        <translation>&amp;Projet</translation>
186+
    </message>
187+
    <message>
188+
        <location filename="../offlate/window.py" line="596"/>
189+
        <source>&amp;Edit</source>
190+
        <translation>&amp;??dition</translation>
191+
    </message>
192+
    <message>
193+
        <location filename="../offlate/window.py" line="599"/>
194+
        <source>&amp;View</source>
195+
        <translation>&amp;Affichage</translation>
196+
    </message>
197+
    <message>
198+
        <location filename="../offlate/window.py" line="579"/>
199+
        <source>Open</source>
200+
        <translation>Ouvrir</translation>
201+
    </message>
202+
    <message>
203+
        <location filename="../offlate/window.py" line="525"/>
204+
        <source>Exit</source>
205+
        <translation>Quitter</translation>
206+
    </message>
207+
    <message>
208+
        <location filename="../offlate/window.py" line="530"/>
209+
        <source>Save</source>
210+
        <translation>Sauvegarder</translation>
211+
    </message>
212+
    <message>
213+
        <location filename="../offlate/window.py" line="535"/>
214+
        <source>New</source>
215+
        <translation>Nouveau</translation>
216+
    </message>
217+
    <message>
218+
        <location filename="../offlate/window.py" line="540"/>
219+
        <source>Update</source>
220+
        <translation>Mettre ?? jour</translation>
221+
    </message>
222+
    <message>
223+
        <location filename="../offlate/window.py" line="545"/>
224+
        <source>Close</source>
225+
        <translation>Fermer</translation>
226+
    </message>
227+
    <message>
228+
        <location filename="../offlate/window.py" line="549"/>
229+
        <source>Send</source>
230+
        <translation>Envoyer</translation>
231+
    </message>
232+
    <message>
233+
        <location filename="../offlate/window.py" line="554"/>
234+
        <source>Settings</source>
235+
        <translation>Param??tres</translation>
236+
    </message>
237+
    <message>
238+
        <location filename="../offlate/window.py" line="568"/>
239+
        <source>Use a monospace font</source>
240+
        <translation type="unfinished"></translation>
241+
    </message>
242+
    <message>
243+
        <location filename="../offlate/window.py" line="478"/>
244+
        <source>{} translated on {} total ({}%).</source>
245+
        <translation type="unfinished"></translation>
246+
    </message>
247+
</context>
248+
<context>
249+
    <name>self.qd</name>
250+
    <message>
251+
        <location filename="../offlate/window.py" line="27"/>
252+
        <source>Please enter your password:</source>
253+
        <translation>Veuillez entrer votre mot de passe :</translation>
254+
    </message>
255+
</context>
256+
</TS>

setup.py

11
from setuptools import setup, find_packages
2+
import distutils
3+
4+
class LocalesCommand(distutils.cmd.Command):
5+
    description='compile locale files'
6+
    def run(self):
7+
        command = ["make" "update-langs"]
8+
        subprocess.check_call(command)
29
310
setup (
411
    name="offlate",

1219
        ]
1320
    },
1421
15-
    package_data={'offlate': ['offlate/data.json']},
22+
    package_data={'offlate': ['data.json', 'locales/*.qm', 'locales/*.ts']},
23+
    cmdclass={
24+
        'locales': LocalesCommand,
25+
    },
1626
1727
    author="Julien Lepiller",
1828
    author_email="julien@lepiller.eu",