Merge lp:~dholbach/help-app/1426304 into lp:~ubuntu-touch-coreapps-drivers/help-app/trunk
- 1426304
- Merge into trunk
| Status: | Merged |
|---|---|
| Merged at revision: | 67 |
| Proposed branch: | lp:~dholbach/help-app/1426304 |
| Merge into: | lp:~ubuntu-touch-coreapps-drivers/help-app/trunk |
| Diff against target: |
1083 lines (+391/-266) 10 files modified
edit-here/generate-pot (+1/-2) edit-here/generate-translations (+0/-1) edit-here/index.html (+4/-0) edit-here/po/de.po (+39/-26) edit-here/po/fr.po (+37/-25) edit-here/po/help.pot (+5/-5) edit-here/po/it.po (+37/-25) edit-here/po/pt.po (+38/-27) edit-here/po/ro.po (+37/-25) edit-here/translations.py (+193/-130) |
| To merge this branch: | bzr merge lp:~dholbach/help-app/1426304 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| David Planella | Approve | ||
| Daniel Holbach (community) | Needs Fixing | ||
|
Review via email:
|
|||
Commit message
Description of the change
- 68. By Daniel Holbach
-
add require() function to simplify code a bit
- 69. By Daniel Holbach
-
update index.html with new languages
- 70. By Daniel Holbach
-
merge from trunk, resolve conflicts
- 71. By Daniel Holbach
-
update German translation, this will help as a test-case
- 72. By Daniel Holbach
-
omit untranslated 'Title:' line, as it would give us two 'Title:' lines
- 73. By Daniel Holbach
-
also bend links if the link title is translated
- 74. By Daniel Holbach
-
fix case where 'original_title in msgid' was not good enough, we need it exact
- 75. By Daniel Holbach
-
add Portoguese
| Daniel Holbach (dholbach) wrote : | # |
Ok, we decided to go without saving 'title_lines' anywhere, but just agree that the Title line is always the first. I'll add a piece of code in the "Title" line replacer which checks the line number.
Working on this now.
- 76. By Daniel Holbach
-
instead of doing internal bookkeeping, assume that the first line is the title_line - also error out, if we find a title line that doesn't have linenumber 1
| David Planella (dpm) wrote : | # |
Looks good to me, good work! I've just added an inline comment as a suggestion, but for me it's already good to go.
- 77. By Daniel Holbach
-
remove leftover print statement
| Daniel Holbach (dholbach) wrote : | # |
Fixed.
Preview Diff
| 1 | === modified file 'edit-here/generate-pot' | |||
| 2 | --- edit-here/generate-pot 2015-02-25 16:02:15 +0000 | |||
| 3 | +++ edit-here/generate-pot 2015-03-05 08:14:16 +0000 | |||
| 4 | @@ -10,8 +10,7 @@ | |||
| 5 | 10 | 10 | ||
| 6 | 11 | def main(): | 11 | def main(): |
| 7 | 12 | translations = Translations() | 12 | translations = Translations() |
| 10 | 13 | translations.generate_pot_file() | 13 | if not translations.generate_pot_file(): |
| 9 | 14 | if not translations.update_po_files(): | ||
| 11 | 15 | sys.exit(1) | 14 | sys.exit(1) |
| 12 | 16 | 15 | ||
| 13 | 17 | if __name__ == '__main__': | 16 | if __name__ == '__main__': |
| 14 | 18 | 17 | ||
| 15 | === modified file 'edit-here/generate-translations' | |||
| 16 | --- edit-here/generate-translations 2015-02-25 14:41:25 +0000 | |||
| 17 | +++ edit-here/generate-translations 2015-03-05 08:14:16 +0000 | |||
| 18 | @@ -9,7 +9,6 @@ | |||
| 19 | 9 | 9 | ||
| 20 | 10 | def main(): | 10 | def main(): |
| 21 | 11 | translations = Translations() | 11 | translations = Translations() |
| 22 | 12 | translations.rewrite_links() | ||
| 23 | 13 | translations.generate_translations() | 12 | translations.generate_translations() |
| 24 | 14 | 13 | ||
| 25 | 15 | 14 | ||
| 26 | 16 | 15 | ||
| 27 | === modified file 'edit-here/index.html' | |||
| 28 | --- edit-here/index.html 2015-02-26 14:25:16 +0000 | |||
| 29 | +++ edit-here/index.html 2015-03-05 08:14:16 +0000 | |||
| 30 | @@ -10,7 +10,11 @@ | |||
| 31 | 10 | <body> | 10 | <body> |
| 32 | 11 | <ul> | 11 | <ul> |
| 33 | 12 | <li><a href="index.en-us.html">English</a></li> | 12 | <li><a href="index.en-us.html">English</a></li> |
| 34 | 13 | <li><a href="index.fr.html">French</a></li> | ||
| 35 | 13 | <li><a href="index.de.html">German</a></li> | 14 | <li><a href="index.de.html">German</a></li> |
| 36 | 15 | <li><a href="index.it.html">Italian</a></li> | ||
| 37 | 16 | <li><a href="index.pt.html">Portuguese</a></li> | ||
| 38 | 17 | <li><a href="index.ro.html">Romanian</a></li> | ||
| 39 | 14 | </ul> | 18 | </ul> |
| 40 | 15 | </body> | 19 | </body> |
| 41 | 16 | </html> | 20 | </html> |
| 42 | 17 | 21 | ||
| 43 | === modified file 'edit-here/po/de.po' | |||
| 44 | --- edit-here/po/de.po 2015-02-28 06:41:48 +0000 | |||
| 45 | +++ edit-here/po/de.po 2015-03-05 08:14:16 +0000 | |||
| 46 | @@ -2,7 +2,7 @@ | |||
| 47 | 2 | # Copyright (C) YEAR Free Software Foundation, Inc. | 2 | # Copyright (C) YEAR Free Software Foundation, Inc. |
| 48 | 3 | # This file is distributed under the same license as the PACKAGE package. | 3 | # This file is distributed under the same license as the PACKAGE package. |
| 49 | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 51 | 5 | # | 5 | # |
| 52 | 6 | msgid "" | 6 | msgid "" |
| 53 | 7 | msgstr "" | 7 | msgstr "" |
| 54 | 8 | "Project-Id-Version: PACKAGE VERSION\n" | 8 | "Project-Id-Version: PACKAGE VERSION\n" |
| 55 | @@ -11,17 +11,12 @@ | |||
| 56 | 11 | "PO-Revision-Date: 2015-02-27 03:52+0000\n" | 11 | "PO-Revision-Date: 2015-02-27 03:52+0000\n" |
| 57 | 12 | "Last-Translator: Daniel Holbach <daniel.holbach@ubuntu.com>\n" | 12 | "Last-Translator: Daniel Holbach <daniel.holbach@ubuntu.com>\n" |
| 58 | 13 | "Language-Team: LANGUAGE <LL@li.org>\n" | 13 | "Language-Team: LANGUAGE <LL@li.org>\n" |
| 59 | 14 | "Language: \n" | ||
| 60 | 14 | "MIME-Version: 1.0\n" | 15 | "MIME-Version: 1.0\n" |
| 61 | 15 | "Content-Type: text/plain; charset=UTF-8\n" | 16 | "Content-Type: text/plain; charset=UTF-8\n" |
| 62 | 16 | "Content-Transfer-Encoding: 8bit\n" | 17 | "Content-Transfer-Encoding: 8bit\n" |
| 63 | 18 | "X-Generator: Launchpad (build 17361)\n" | ||
| 64 | 17 | "X-Launchpad-Export-Date: 2015-02-28 06:41+0000\n" | 19 | "X-Launchpad-Export-Date: 2015-02-28 06:41+0000\n" |
| 65 | 18 | "X-Generator: Launchpad (build 17361)\n" | ||
| 66 | 19 | "Language: \n" | ||
| 67 | 20 | |||
| 68 | 21 | #. type: Plain text | ||
| 69 | 22 | #: content/pages/faq.md:2 | ||
| 70 | 23 | msgid "Title: Get your questions answered." | ||
| 71 | 24 | msgstr "Title: Antworten auf Deine Fragen." | ||
| 72 | 25 | 20 | ||
| 73 | 26 | #. type: Plain text | 21 | #. type: Plain text |
| 74 | 27 | #: content/pages/faq.md:5 | 22 | #: content/pages/faq.md:5 |
| 75 | @@ -43,11 +38,6 @@ | |||
| 76 | 43 | msgstr "..." | 38 | msgstr "..." |
| 77 | 44 | 39 | ||
| 78 | 45 | #. type: Plain text | 40 | #. type: Plain text |
| 79 | 46 | #: content/pages/index.md:2 | ||
| 80 | 47 | msgid "Title: Welcome to Help for Ubuntu for devices!" | ||
| 81 | 48 | msgstr "Title: Willkommen bei der Hilfe für Ubuntu-Geräte!" | ||
| 82 | 49 | |||
| 83 | 50 | #. type: Plain text | ||
| 84 | 51 | #: content/pages/index.md:5 | 41 | #: content/pages/index.md:5 |
| 85 | 52 | msgid "" | 42 | msgid "" |
| 86 | 53 | "The world-wide Ubuntu community wants to give you the best possible " | 43 | "The world-wide Ubuntu community wants to give you the best possible " |
| 87 | @@ -70,7 +60,8 @@ | |||
| 88 | 70 | #: content/pages/index.md:9 | 60 | #: content/pages/index.md:9 |
| 89 | 71 | msgid "links to get in touch with experts and other community members" | 61 | msgid "links to get in touch with experts and other community members" |
| 90 | 72 | msgstr "" | 62 | msgstr "" |
| 92 | 73 | "Links, um mit anderen Community-Mitgliedern und Experten in Kontakt zu kommen" | 63 | "Links, um mit anderen Community-Mitgliedern und Experten in Kontakt zu " |
| 93 | 64 | "kommen" | ||
| 94 | 74 | 65 | ||
| 95 | 75 | #. type: Plain text | 66 | #. type: Plain text |
| 96 | 76 | #: content/pages/index.md:11 | 67 | #: content/pages/index.md:11 |
| 97 | @@ -81,17 +72,12 @@ | |||
| 98 | 81 | #: content/pages/index.md:12 | 72 | #: content/pages/index.md:12 |
| 99 | 82 | #, no-wrap | 73 | #, no-wrap |
| 100 | 83 | msgid "[Take me to the FAQ!]({filename}faq.md) \n" | 74 | msgid "[Take me to the FAQ!]({filename}faq.md) \n" |
| 102 | 84 | msgstr "[Gib mir die Antworten!]({filename}faq.md) \n" | 75 | msgstr "[Gib mir die Antworten!]({filename}faq.de.md) \n" |
| 103 | 85 | 76 | ||
| 104 | 86 | #. type: Plain text | 77 | #. type: Plain text |
| 105 | 87 | #: content/pages/index.md:14 | 78 | #: content/pages/index.md:14 |
| 106 | 88 | msgid "[Get in touch]({filename}get-in-touch.md)" | 79 | msgid "[Get in touch]({filename}get-in-touch.md)" |
| 113 | 89 | msgstr "[Kontakt]({filename}get-in-touch.md)" | 80 | msgstr "[Kontakt]({filename}get-in-touch.de.md)" |
| 108 | 90 | |||
| 109 | 91 | #. type: Plain text | ||
| 110 | 92 | #: content/pages/apps.md:2 | ||
| 111 | 93 | msgid "Title: FAQ - Apps" | ||
| 112 | 94 | msgstr "Title: FAQ - Apps" | ||
| 114 | 95 | 81 | ||
| 115 | 96 | #. type: Plain text | 82 | #. type: Plain text |
| 116 | 97 | #: content/pages/apps.md:5 | 83 | #: content/pages/apps.md:5 |
| 117 | @@ -138,11 +124,6 @@ | |||
| 118 | 138 | "---\n" | 124 | "---\n" |
| 119 | 139 | 125 | ||
| 120 | 140 | #. type: Plain text | 126 | #. type: Plain text |
| 121 | 141 | #: content/pages/get-in-touch.md:2 | ||
| 122 | 142 | msgid "Title: Get in touch" | ||
| 123 | 143 | msgstr "Title: Kontakt" | ||
| 124 | 144 | |||
| 125 | 145 | #. type: Plain text | ||
| 126 | 146 | #: content/pages/get-in-touch.md:7 | 127 | #: content/pages/get-in-touch.md:7 |
| 127 | 147 | #, no-wrap | 128 | #, no-wrap |
| 128 | 148 | msgid "" | 129 | msgid "" |
| 129 | @@ -167,3 +148,35 @@ | |||
| 130 | 167 | "out about all the individual teams in Ubuntu, what they do, where they hang " | 148 | "out about all the individual teams in Ubuntu, what they do, where they hang " |
| 131 | 168 | "out and how to get involved." | 149 | "out and how to get involved." |
| 132 | 169 | msgstr "" | 150 | msgstr "" |
| 133 | 151 | |||
| 134 | 152 | #. type: Plain text | ||
| 135 | 153 | #: content/pages/faq.md:2 | ||
| 136 | 154 | msgid "Get your questions answered." | ||
| 137 | 155 | msgstr "Antworten auf Deine Fragen." | ||
| 138 | 156 | |||
| 139 | 157 | #. type: Plain text | ||
| 140 | 158 | #: content/pages/index.md:2 | ||
| 141 | 159 | msgid "Welcome to Help for Ubuntu for devices!" | ||
| 142 | 160 | msgstr "Willkommen zur Ubuntu Hilfe!" | ||
| 143 | 161 | |||
| 144 | 162 | #. type: Plain text | ||
| 145 | 163 | #: content/pages/apps.md:2 | ||
| 146 | 164 | msgid "FAQ - Apps" | ||
| 147 | 165 | msgstr "" | ||
| 148 | 166 | |||
| 149 | 167 | #. type: Plain text | ||
| 150 | 168 | #: content/pages/get-in-touch.md:2 | ||
| 151 | 169 | msgid "Get in touch" | ||
| 152 | 170 | msgstr "Kontakt" | ||
| 153 | 171 | |||
| 154 | 172 | #~ msgid "Title: Get your questions answered." | ||
| 155 | 173 | #~ msgstr "Title: Antworten auf Deine Fragen." | ||
| 156 | 174 | |||
| 157 | 175 | #~ msgid "Title: Welcome to Help for Ubuntu for devices!" | ||
| 158 | 176 | #~ msgstr "Title: Willkommen bei der Hilfe für Ubuntu-Geräte!" | ||
| 159 | 177 | |||
| 160 | 178 | #~ msgid "Title: FAQ - Apps" | ||
| 161 | 179 | #~ msgstr "Title: FAQ - Apps" | ||
| 162 | 180 | |||
| 163 | 181 | #~ msgid "Title: Get in touch" | ||
| 164 | 182 | #~ msgstr "Title: Kontakt" | ||
| 165 | 170 | 183 | ||
| 166 | === modified file 'edit-here/po/fr.po' | |||
| 167 | --- edit-here/po/fr.po 2015-02-28 06:41:48 +0000 | |||
| 168 | +++ edit-here/po/fr.po 2015-03-05 08:14:16 +0000 | |||
| 169 | @@ -2,7 +2,7 @@ | |||
| 170 | 2 | # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 | 2 | # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 |
| 171 | 3 | # This file is distributed under the same license as the ubuntu-devices-help package. | 3 | # This file is distributed under the same license as the ubuntu-devices-help package. |
| 172 | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2015. | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2015. |
| 174 | 5 | # | 5 | # |
| 175 | 6 | msgid "" | 6 | msgid "" |
| 176 | 7 | msgstr "" | 7 | msgstr "" |
| 177 | 8 | "Project-Id-Version: ubuntu-devices-help\n" | 8 | "Project-Id-Version: ubuntu-devices-help\n" |
| 178 | @@ -14,13 +14,8 @@ | |||
| 179 | 14 | "MIME-Version: 1.0\n" | 14 | "MIME-Version: 1.0\n" |
| 180 | 15 | "Content-Type: text/plain; charset=UTF-8\n" | 15 | "Content-Type: text/plain; charset=UTF-8\n" |
| 181 | 16 | "Content-Transfer-Encoding: 8bit\n" | 16 | "Content-Transfer-Encoding: 8bit\n" |
| 182 | 17 | "X-Generator: Launchpad (build 17361)\n" | ||
| 183 | 17 | "X-Launchpad-Export-Date: 2015-02-28 06:41+0000\n" | 18 | "X-Launchpad-Export-Date: 2015-02-28 06:41+0000\n" |
| 184 | 18 | "X-Generator: Launchpad (build 17361)\n" | ||
| 185 | 19 | |||
| 186 | 20 | #. type: Plain text | ||
| 187 | 21 | #: content/pages/faq.md:2 | ||
| 188 | 22 | msgid "Title: Get your questions answered." | ||
| 189 | 23 | msgstr "" | ||
| 190 | 24 | 19 | ||
| 191 | 25 | #. type: Plain text | 20 | #. type: Plain text |
| 192 | 26 | #: content/pages/faq.md:5 | 21 | #: content/pages/faq.md:5 |
| 193 | @@ -32,7 +27,7 @@ | |||
| 194 | 32 | #. type: Bullet: ' * ' | 27 | #. type: Bullet: ' * ' |
| 195 | 33 | #: content/pages/faq.md:7 | 28 | #: content/pages/faq.md:7 |
| 196 | 34 | msgid "[Apps]({filename}apps.md)" | 29 | msgid "[Apps]({filename}apps.md)" |
| 198 | 35 | msgstr "" | 30 | msgstr "[Apps]({filename}apps.fr.md)" |
| 199 | 36 | 31 | ||
| 200 | 37 | #. type: Bullet: ' * ' | 32 | #. type: Bullet: ' * ' |
| 201 | 38 | #: content/pages/faq.md:7 | 33 | #: content/pages/faq.md:7 |
| 202 | @@ -40,11 +35,6 @@ | |||
| 203 | 40 | msgstr "" | 35 | msgstr "" |
| 204 | 41 | 36 | ||
| 205 | 42 | #. type: Plain text | 37 | #. type: Plain text |
| 206 | 43 | #: content/pages/index.md:2 | ||
| 207 | 44 | msgid "Title: Welcome to Help for Ubuntu for devices!" | ||
| 208 | 45 | msgstr "" | ||
| 209 | 46 | |||
| 210 | 47 | #. type: Plain text | ||
| 211 | 48 | #: content/pages/index.md:5 | 38 | #: content/pages/index.md:5 |
| 212 | 49 | msgid "" | 39 | msgid "" |
| 213 | 50 | "The world-wide Ubuntu community wants to give you the best possible " | 40 | "The world-wide Ubuntu community wants to give you the best possible " |
| 214 | @@ -75,17 +65,12 @@ | |||
| 215 | 75 | #: content/pages/index.md:12 | 65 | #: content/pages/index.md:12 |
| 216 | 76 | #, no-wrap | 66 | #, no-wrap |
| 217 | 77 | msgid "[Take me to the FAQ!]({filename}faq.md) \n" | 67 | msgid "[Take me to the FAQ!]({filename}faq.md) \n" |
| 219 | 78 | msgstr "" | 68 | msgstr "[Take me to the FAQ!]({filename}faq.fr.md) \n" |
| 220 | 79 | 69 | ||
| 221 | 80 | #. type: Plain text | 70 | #. type: Plain text |
| 222 | 81 | #: content/pages/index.md:14 | 71 | #: content/pages/index.md:14 |
| 223 | 82 | msgid "[Get in touch]({filename}get-in-touch.md)" | 72 | msgid "[Get in touch]({filename}get-in-touch.md)" |
| 230 | 83 | msgstr "" | 73 | msgstr "[Get in touch]({filename}get-in-touch.fr.md)" |
| 225 | 84 | |||
| 226 | 85 | #. type: Plain text | ||
| 227 | 86 | #: content/pages/apps.md:2 | ||
| 228 | 87 | msgid "Title: FAQ - Apps" | ||
| 229 | 88 | msgstr "" | ||
| 231 | 89 | 74 | ||
| 232 | 90 | #. type: Plain text | 75 | #. type: Plain text |
| 233 | 91 | #: content/pages/apps.md:5 | 76 | #: content/pages/apps.md:5 |
| 234 | @@ -124,11 +109,6 @@ | |||
| 235 | 124 | msgstr "" | 109 | msgstr "" |
| 236 | 125 | 110 | ||
| 237 | 126 | #. type: Plain text | 111 | #. type: Plain text |
| 238 | 127 | #: content/pages/get-in-touch.md:2 | ||
| 239 | 128 | msgid "Title: Get in touch" | ||
| 240 | 129 | msgstr "" | ||
| 241 | 130 | |||
| 242 | 131 | #. type: Plain text | ||
| 243 | 132 | #: content/pages/get-in-touch.md:7 | 112 | #: content/pages/get-in-touch.md:7 |
| 244 | 133 | #, no-wrap | 113 | #, no-wrap |
| 245 | 134 | msgid "" | 114 | msgid "" |
| 246 | @@ -147,3 +127,35 @@ | |||
| 247 | 147 | "out about all the individual teams in Ubuntu, what they do, where they hang " | 127 | "out about all the individual teams in Ubuntu, what they do, where they hang " |
| 248 | 148 | "out and how to get involved." | 128 | "out and how to get involved." |
| 249 | 149 | msgstr "" | 129 | msgstr "" |
| 250 | 130 | |||
| 251 | 131 | #. type: Plain text | ||
| 252 | 132 | #: content/pages/faq.md:2 | ||
| 253 | 133 | msgid "Get your questions answered." | ||
| 254 | 134 | msgstr "" | ||
| 255 | 135 | |||
| 256 | 136 | #. type: Plain text | ||
| 257 | 137 | #: content/pages/index.md:2 | ||
| 258 | 138 | msgid "Welcome to Help for Ubuntu for devices!" | ||
| 259 | 139 | msgstr "" | ||
| 260 | 140 | |||
| 261 | 141 | #. type: Plain text | ||
| 262 | 142 | #: content/pages/apps.md:2 | ||
| 263 | 143 | msgid "FAQ - Apps" | ||
| 264 | 144 | msgstr "" | ||
| 265 | 145 | |||
| 266 | 146 | #. type: Plain text | ||
| 267 | 147 | #: content/pages/get-in-touch.md:2 | ||
| 268 | 148 | msgid "Get in touch" | ||
| 269 | 149 | msgstr "" | ||
| 270 | 150 | |||
| 271 | 151 | #~ msgid "Title: Get your questions answered." | ||
| 272 | 152 | #~ msgstr "" | ||
| 273 | 153 | |||
| 274 | 154 | #~ msgid "Title: Welcome to Help for Ubuntu for devices!" | ||
| 275 | 155 | #~ msgstr "" | ||
| 276 | 156 | |||
| 277 | 157 | #~ msgid "Title: FAQ - Apps" | ||
| 278 | 158 | #~ msgstr "" | ||
| 279 | 159 | |||
| 280 | 160 | #~ msgid "Title: Get in touch" | ||
| 281 | 161 | #~ msgstr "" | ||
| 282 | 150 | 162 | ||
| 283 | === modified file 'edit-here/po/help.pot' | |||
| 284 | --- edit-here/po/help.pot 2015-02-26 14:28:46 +0000 | |||
| 285 | +++ edit-here/po/help.pot 2015-03-05 08:14:16 +0000 | |||
| 286 | @@ -2,7 +2,7 @@ | |||
| 287 | 2 | # Copyright (C) YEAR Free Software Foundation, Inc. | 2 | # Copyright (C) YEAR Free Software Foundation, Inc. |
| 288 | 3 | # This file is distributed under the same license as the PACKAGE package. | 3 | # This file is distributed under the same license as the PACKAGE package. |
| 289 | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 291 | 5 | # | 5 | # |
| 292 | 6 | #, fuzzy | 6 | #, fuzzy |
| 293 | 7 | msgid "" | 7 | msgid "" |
| 294 | 8 | msgstr "" | 8 | msgstr "" |
| 295 | @@ -18,7 +18,7 @@ | |||
| 296 | 18 | 18 | ||
| 297 | 19 | #. type: Plain text | 19 | #. type: Plain text |
| 298 | 20 | #: content/pages/faq.md:2 | 20 | #: content/pages/faq.md:2 |
| 300 | 21 | msgid "Title: Get your questions answered." | 21 | msgid "Get your questions answered." |
| 301 | 22 | msgstr "" | 22 | msgstr "" |
| 302 | 23 | 23 | ||
| 303 | 24 | #. type: Plain text | 24 | #. type: Plain text |
| 304 | @@ -40,7 +40,7 @@ | |||
| 305 | 40 | 40 | ||
| 306 | 41 | #. type: Plain text | 41 | #. type: Plain text |
| 307 | 42 | #: content/pages/index.md:2 | 42 | #: content/pages/index.md:2 |
| 309 | 43 | msgid "Title: Welcome to Help for Ubuntu for devices!" | 43 | msgid "Welcome to Help for Ubuntu for devices!" |
| 310 | 44 | msgstr "" | 44 | msgstr "" |
| 311 | 45 | 45 | ||
| 312 | 46 | #. type: Plain text | 46 | #. type: Plain text |
| 313 | @@ -83,7 +83,7 @@ | |||
| 314 | 83 | 83 | ||
| 315 | 84 | #. type: Plain text | 84 | #. type: Plain text |
| 316 | 85 | #: content/pages/apps.md:2 | 85 | #: content/pages/apps.md:2 |
| 318 | 86 | msgid "Title: FAQ - Apps" | 86 | msgid "FAQ - Apps" |
| 319 | 87 | msgstr "" | 87 | msgstr "" |
| 320 | 88 | 88 | ||
| 321 | 89 | #. type: Plain text | 89 | #. type: Plain text |
| 322 | @@ -124,7 +124,7 @@ | |||
| 323 | 124 | 124 | ||
| 324 | 125 | #. type: Plain text | 125 | #. type: Plain text |
| 325 | 126 | #: content/pages/get-in-touch.md:2 | 126 | #: content/pages/get-in-touch.md:2 |
| 327 | 127 | msgid "Title: Get in touch" | 127 | msgid "Get in touch" |
| 328 | 128 | msgstr "" | 128 | msgstr "" |
| 329 | 129 | 129 | ||
| 330 | 130 | #. type: Plain text | 130 | #. type: Plain text |
| 331 | 131 | 131 | ||
| 332 | === modified file 'edit-here/po/it.po' | |||
| 333 | --- edit-here/po/it.po 2015-03-02 06:02:11 +0000 | |||
| 334 | +++ edit-here/po/it.po 2015-03-05 08:14:16 +0000 | |||
| 335 | @@ -2,7 +2,7 @@ | |||
| 336 | 2 | # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 | 2 | # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 |
| 337 | 3 | # This file is distributed under the same license as the ubuntu-devices-help package. | 3 | # This file is distributed under the same license as the ubuntu-devices-help package. |
| 338 | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2015. | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2015. |
| 340 | 5 | # | 5 | # |
| 341 | 6 | msgid "" | 6 | msgid "" |
| 342 | 7 | msgstr "" | 7 | msgstr "" |
| 343 | 8 | "Project-Id-Version: ubuntu-devices-help\n" | 8 | "Project-Id-Version: ubuntu-devices-help\n" |
| 344 | @@ -14,13 +14,8 @@ | |||
| 345 | 14 | "MIME-Version: 1.0\n" | 14 | "MIME-Version: 1.0\n" |
| 346 | 15 | "Content-Type: text/plain; charset=UTF-8\n" | 15 | "Content-Type: text/plain; charset=UTF-8\n" |
| 347 | 16 | "Content-Transfer-Encoding: 8bit\n" | 16 | "Content-Transfer-Encoding: 8bit\n" |
| 348 | 17 | "X-Generator: Launchpad (build 17361)\n" | ||
| 349 | 17 | "X-Launchpad-Export-Date: 2015-03-02 06:02+0000\n" | 18 | "X-Launchpad-Export-Date: 2015-03-02 06:02+0000\n" |
| 350 | 18 | "X-Generator: Launchpad (build 17361)\n" | ||
| 351 | 19 | |||
| 352 | 20 | #. type: Plain text | ||
| 353 | 21 | #: content/pages/faq.md:2 | ||
| 354 | 22 | msgid "Title: Get your questions answered." | ||
| 355 | 23 | msgstr "" | ||
| 356 | 24 | 19 | ||
| 357 | 25 | #. type: Plain text | 20 | #. type: Plain text |
| 358 | 26 | #: content/pages/faq.md:5 | 21 | #: content/pages/faq.md:5 |
| 359 | @@ -32,7 +27,7 @@ | |||
| 360 | 32 | #. type: Bullet: ' * ' | 27 | #. type: Bullet: ' * ' |
| 361 | 33 | #: content/pages/faq.md:7 | 28 | #: content/pages/faq.md:7 |
| 362 | 34 | msgid "[Apps]({filename}apps.md)" | 29 | msgid "[Apps]({filename}apps.md)" |
| 364 | 35 | msgstr "" | 30 | msgstr "[Apps]({filename}apps.it.md)" |
| 365 | 36 | 31 | ||
| 366 | 37 | #. type: Bullet: ' * ' | 32 | #. type: Bullet: ' * ' |
| 367 | 38 | #: content/pages/faq.md:7 | 33 | #: content/pages/faq.md:7 |
| 368 | @@ -40,11 +35,6 @@ | |||
| 369 | 40 | msgstr "" | 35 | msgstr "" |
| 370 | 41 | 36 | ||
| 371 | 42 | #. type: Plain text | 37 | #. type: Plain text |
| 372 | 43 | #: content/pages/index.md:2 | ||
| 373 | 44 | msgid "Title: Welcome to Help for Ubuntu for devices!" | ||
| 374 | 45 | msgstr "" | ||
| 375 | 46 | |||
| 376 | 47 | #. type: Plain text | ||
| 377 | 48 | #: content/pages/index.md:5 | 38 | #: content/pages/index.md:5 |
| 378 | 49 | msgid "" | 39 | msgid "" |
| 379 | 50 | "The world-wide Ubuntu community wants to give you the best possible " | 40 | "The world-wide Ubuntu community wants to give you the best possible " |
| 380 | @@ -75,17 +65,12 @@ | |||
| 381 | 75 | #: content/pages/index.md:12 | 65 | #: content/pages/index.md:12 |
| 382 | 76 | #, no-wrap | 66 | #, no-wrap |
| 383 | 77 | msgid "[Take me to the FAQ!]({filename}faq.md) \n" | 67 | msgid "[Take me to the FAQ!]({filename}faq.md) \n" |
| 385 | 78 | msgstr "" | 68 | msgstr "[Take me to the FAQ!]({filename}faq.it.md) \n" |
| 386 | 79 | 69 | ||
| 387 | 80 | #. type: Plain text | 70 | #. type: Plain text |
| 388 | 81 | #: content/pages/index.md:14 | 71 | #: content/pages/index.md:14 |
| 389 | 82 | msgid "[Get in touch]({filename}get-in-touch.md)" | 72 | msgid "[Get in touch]({filename}get-in-touch.md)" |
| 396 | 83 | msgstr "" | 73 | msgstr "[Get in touch]({filename}get-in-touch.it.md)" |
| 391 | 84 | |||
| 392 | 85 | #. type: Plain text | ||
| 393 | 86 | #: content/pages/apps.md:2 | ||
| 394 | 87 | msgid "Title: FAQ - Apps" | ||
| 395 | 88 | msgstr "" | ||
| 397 | 89 | 74 | ||
| 398 | 90 | #. type: Plain text | 75 | #. type: Plain text |
| 399 | 91 | #: content/pages/apps.md:5 | 76 | #: content/pages/apps.md:5 |
| 400 | @@ -124,11 +109,6 @@ | |||
| 401 | 124 | msgstr "" | 109 | msgstr "" |
| 402 | 125 | 110 | ||
| 403 | 126 | #. type: Plain text | 111 | #. type: Plain text |
| 404 | 127 | #: content/pages/get-in-touch.md:2 | ||
| 405 | 128 | msgid "Title: Get in touch" | ||
| 406 | 129 | msgstr "" | ||
| 407 | 130 | |||
| 408 | 131 | #. type: Plain text | ||
| 409 | 132 | #: content/pages/get-in-touch.md:7 | 112 | #: content/pages/get-in-touch.md:7 |
| 410 | 133 | #, no-wrap | 113 | #, no-wrap |
| 411 | 134 | msgid "" | 114 | msgid "" |
| 412 | @@ -147,3 +127,35 @@ | |||
| 413 | 147 | "out about all the individual teams in Ubuntu, what they do, where they hang " | 127 | "out about all the individual teams in Ubuntu, what they do, where they hang " |
| 414 | 148 | "out and how to get involved." | 128 | "out and how to get involved." |
| 415 | 149 | msgstr "" | 129 | msgstr "" |
| 416 | 130 | |||
| 417 | 131 | #. type: Plain text | ||
| 418 | 132 | #: content/pages/faq.md:2 | ||
| 419 | 133 | msgid "Get your questions answered." | ||
| 420 | 134 | msgstr "" | ||
| 421 | 135 | |||
| 422 | 136 | #. type: Plain text | ||
| 423 | 137 | #: content/pages/index.md:2 | ||
| 424 | 138 | msgid "Welcome to Help for Ubuntu for devices!" | ||
| 425 | 139 | msgstr "" | ||
| 426 | 140 | |||
| 427 | 141 | #. type: Plain text | ||
| 428 | 142 | #: content/pages/apps.md:2 | ||
| 429 | 143 | msgid "FAQ - Apps" | ||
| 430 | 144 | msgstr "" | ||
| 431 | 145 | |||
| 432 | 146 | #. type: Plain text | ||
| 433 | 147 | #: content/pages/get-in-touch.md:2 | ||
| 434 | 148 | msgid "Get in touch" | ||
| 435 | 149 | msgstr "" | ||
| 436 | 150 | |||
| 437 | 151 | #~ msgid "Title: Get your questions answered." | ||
| 438 | 152 | #~ msgstr "" | ||
| 439 | 153 | |||
| 440 | 154 | #~ msgid "Title: Welcome to Help for Ubuntu for devices!" | ||
| 441 | 155 | #~ msgstr "" | ||
| 442 | 156 | |||
| 443 | 157 | #~ msgid "Title: FAQ - Apps" | ||
| 444 | 158 | #~ msgstr "" | ||
| 445 | 159 | |||
| 446 | 160 | #~ msgid "Title: Get in touch" | ||
| 447 | 161 | #~ msgstr "" | ||
| 448 | 150 | 162 | ||
| 449 | === modified file 'edit-here/po/pt.po' | |||
| 450 | --- edit-here/po/pt.po 2015-03-02 16:56:02 +0000 | |||
| 451 | +++ edit-here/po/pt.po 2015-03-05 08:14:16 +0000 | |||
| 452 | @@ -2,7 +2,7 @@ | |||
| 453 | 2 | # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 | 2 | # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 |
| 454 | 3 | # This file is distributed under the same license as the ubuntu-devices-help package. | 3 | # This file is distributed under the same license as the ubuntu-devices-help package. |
| 455 | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2015. | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2015. |
| 457 | 5 | # | 5 | # |
| 458 | 6 | msgid "" | 6 | msgid "" |
| 459 | 7 | msgstr "" | 7 | msgstr "" |
| 460 | 8 | "Project-Id-Version: ubuntu-devices-help\n" | 8 | "Project-Id-Version: ubuntu-devices-help\n" |
| 461 | @@ -14,13 +14,8 @@ | |||
| 462 | 14 | "MIME-Version: 1.0\n" | 14 | "MIME-Version: 1.0\n" |
| 463 | 15 | "Content-Type: text/plain; charset=UTF-8\n" | 15 | "Content-Type: text/plain; charset=UTF-8\n" |
| 464 | 16 | "Content-Transfer-Encoding: 8bit\n" | 16 | "Content-Transfer-Encoding: 8bit\n" |
| 465 | 17 | "X-Generator: Launchpad (build 17361)\n" | ||
| 466 | 17 | "X-Launchpad-Export-Date: 2015-03-01 05:48+0000\n" | 18 | "X-Launchpad-Export-Date: 2015-03-01 05:48+0000\n" |
| 467 | 18 | "X-Generator: Launchpad (build 17361)\n" | ||
| 468 | 19 | |||
| 469 | 20 | #. type: Plain text | ||
| 470 | 21 | #: content/pages/faq.md:2 | ||
| 471 | 22 | msgid "Title: Get your questions answered." | ||
| 472 | 23 | msgstr "Title: Ter resposta para as suas questões." | ||
| 473 | 24 | 19 | ||
| 474 | 25 | #. type: Plain text | 20 | #. type: Plain text |
| 475 | 26 | #: content/pages/faq.md:5 | 21 | #: content/pages/faq.md:5 |
| 476 | @@ -34,7 +29,7 @@ | |||
| 477 | 34 | #. type: Bullet: ' * ' | 29 | #. type: Bullet: ' * ' |
| 478 | 35 | #: content/pages/faq.md:7 | 30 | #: content/pages/faq.md:7 |
| 479 | 36 | msgid "[Apps]({filename}apps.md)" | 31 | msgid "[Apps]({filename}apps.md)" |
| 481 | 37 | msgstr "[Apps]({filename}apps.md)" | 32 | msgstr "[Apps]({filename}apps.pt.md)" |
| 482 | 38 | 33 | ||
| 483 | 39 | #. type: Bullet: ' * ' | 34 | #. type: Bullet: ' * ' |
| 484 | 40 | #: content/pages/faq.md:7 | 35 | #: content/pages/faq.md:7 |
| 485 | @@ -42,11 +37,6 @@ | |||
| 486 | 42 | msgstr "..." | 37 | msgstr "..." |
| 487 | 43 | 38 | ||
| 488 | 44 | #. type: Plain text | 39 | #. type: Plain text |
| 489 | 45 | #: content/pages/index.md:2 | ||
| 490 | 46 | msgid "Title: Welcome to Help for Ubuntu for devices!" | ||
| 491 | 47 | msgstr "Title: Bem-vindo à Ajuda de Ubuntu para dispositivos!" | ||
| 492 | 48 | |||
| 493 | 49 | #. type: Plain text | ||
| 494 | 50 | #: content/pages/index.md:5 | 40 | #: content/pages/index.md:5 |
| 495 | 51 | msgid "" | 41 | msgid "" |
| 496 | 52 | "The world-wide Ubuntu community wants to give you the best possible " | 42 | "The world-wide Ubuntu community wants to give you the best possible " |
| 497 | @@ -80,17 +70,12 @@ | |||
| 498 | 80 | #: content/pages/index.md:12 | 70 | #: content/pages/index.md:12 |
| 499 | 81 | #, no-wrap | 71 | #, no-wrap |
| 500 | 82 | msgid "[Take me to the FAQ!]({filename}faq.md) \n" | 72 | msgid "[Take me to the FAQ!]({filename}faq.md) \n" |
| 502 | 83 | msgstr "[Ir para perguntas mais frequentes!]({filename}faq.md) \n" | 73 | msgstr "[Ir para perguntas mais frequentes!]({filename}faq.pt.md) \n" |
| 503 | 84 | 74 | ||
| 504 | 85 | #. type: Plain text | 75 | #. type: Plain text |
| 505 | 86 | #: content/pages/index.md:14 | 76 | #: content/pages/index.md:14 |
| 506 | 87 | msgid "[Get in touch]({filename}get-in-touch.md)" | 77 | msgid "[Get in touch]({filename}get-in-touch.md)" |
| 513 | 88 | msgstr "[Entrar em contacto]({filename}get-in-touch.md)" | 78 | msgstr "[Entrar em contacto]({filename}get-in-touch.pt.md)" |
| 508 | 89 | |||
| 509 | 90 | #. type: Plain text | ||
| 510 | 91 | #: content/pages/apps.md:2 | ||
| 511 | 92 | msgid "Title: FAQ - Apps" | ||
| 512 | 93 | msgstr "Title: Perguntas mais frequentes - Aplicações" | ||
| 514 | 94 | 79 | ||
| 515 | 95 | #. type: Plain text | 80 | #. type: Plain text |
| 516 | 96 | #: content/pages/apps.md:5 | 81 | #: content/pages/apps.md:5 |
| 517 | @@ -136,11 +121,6 @@ | |||
| 518 | 136 | "---\n" | 121 | "---\n" |
| 519 | 137 | 122 | ||
| 520 | 138 | #. type: Plain text | 123 | #. type: Plain text |
| 521 | 139 | #: content/pages/get-in-touch.md:2 | ||
| 522 | 140 | msgid "Title: Get in touch" | ||
| 523 | 141 | msgstr "Title: Entre em contacto" | ||
| 524 | 142 | |||
| 525 | 143 | #. type: Plain text | ||
| 526 | 144 | #: content/pages/get-in-touch.md:7 | 124 | #: content/pages/get-in-touch.md:7 |
| 527 | 145 | #, no-wrap | 125 | #, no-wrap |
| 528 | 146 | msgid "" | 126 | msgid "" |
| 529 | @@ -150,8 +130,7 @@ | |||
| 530 | 150 | "collaboratively-edited question and answer site for Ubuntu users and \n" | 130 | "collaboratively-edited question and answer site for Ubuntu users and \n" |
| 531 | 151 | "developers. 100% free, no registration required. \n" | 131 | "developers. 100% free, no registration required. \n" |
| 532 | 152 | msgstr "" | 132 | msgstr "" |
| 535 | 153 | "O Ubuntu tem uma grande comunidade . Pode facilmente entrar em contacto com " | 133 | "O Ubuntu tem uma grande comunidade . Pode facilmente entrar em contacto com peritos e\n" |
| 534 | 154 | "peritos e\n" | ||
| 536 | 155 | "outros entusiastas. Um bom modo de o fazer, particularmente se**tiver \n" | 134 | "outros entusiastas. Um bom modo de o fazer, particularmente se**tiver \n" |
| 537 | 156 | "questões**, é através [AskUbuntu](http://www.askubuntu.com). É uma \n" | 135 | "questões**, é através [AskUbuntu](http://www.askubuntu.com). É uma \n" |
| 538 | 157 | " página de perguntas e respostas colaborativa para utilizadores Ubuntu e \n" | 136 | " página de perguntas e respostas colaborativa para utilizadores Ubuntu e \n" |
| 539 | @@ -169,3 +148,35 @@ | |||
| 540 | 169 | "Community Website](http://community.ubuntu.com/). Pode facilmente encontrar " | 148 | "Community Website](http://community.ubuntu.com/). Pode facilmente encontrar " |
| 541 | 170 | "tudo sobre as equipas individuais no Ubuntu, o que fazem, onde se encontram " | 149 | "tudo sobre as equipas individuais no Ubuntu, o que fazem, onde se encontram " |
| 542 | 171 | "e sobre como se envolver." | 150 | "e sobre como se envolver." |
| 543 | 151 | |||
| 544 | 152 | #. type: Plain text | ||
| 545 | 153 | #: content/pages/faq.md:2 | ||
| 546 | 154 | msgid "Get your questions answered." | ||
| 547 | 155 | msgstr "" | ||
| 548 | 156 | |||
| 549 | 157 | #. type: Plain text | ||
| 550 | 158 | #: content/pages/index.md:2 | ||
| 551 | 159 | msgid "Welcome to Help for Ubuntu for devices!" | ||
| 552 | 160 | msgstr "" | ||
| 553 | 161 | |||
| 554 | 162 | #. type: Plain text | ||
| 555 | 163 | #: content/pages/apps.md:2 | ||
| 556 | 164 | msgid "FAQ - Apps" | ||
| 557 | 165 | msgstr "" | ||
| 558 | 166 | |||
| 559 | 167 | #. type: Plain text | ||
| 560 | 168 | #: content/pages/get-in-touch.md:2 | ||
| 561 | 169 | msgid "Get in touch" | ||
| 562 | 170 | msgstr "" | ||
| 563 | 171 | |||
| 564 | 172 | #~ msgid "Title: Get your questions answered." | ||
| 565 | 173 | #~ msgstr "Título: Ter resposta para as suas questões." | ||
| 566 | 174 | |||
| 567 | 175 | #~ msgid "Title: Welcome to Help for Ubuntu for devices!" | ||
| 568 | 176 | #~ msgstr "Título: Bem-vindo à Ajuda de Ubuntu para dispositivos!" | ||
| 569 | 177 | |||
| 570 | 178 | #~ msgid "Title: FAQ - Apps" | ||
| 571 | 179 | #~ msgstr "Título: Perguntas mais frequentes - Aplicações" | ||
| 572 | 180 | |||
| 573 | 181 | #~ msgid "Title: Get in touch" | ||
| 574 | 182 | #~ msgstr "Título: Entre em contacto" | ||
| 575 | 172 | 183 | ||
| 576 | === modified file 'edit-here/po/ro.po' | |||
| 577 | --- edit-here/po/ro.po 2015-02-28 06:41:48 +0000 | |||
| 578 | +++ edit-here/po/ro.po 2015-03-05 08:14:16 +0000 | |||
| 579 | @@ -2,7 +2,7 @@ | |||
| 580 | 2 | # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 | 2 | # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 |
| 581 | 3 | # This file is distributed under the same license as the ubuntu-devices-help package. | 3 | # This file is distributed under the same license as the ubuntu-devices-help package. |
| 582 | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2015. | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2015. |
| 584 | 5 | # | 5 | # |
| 585 | 6 | msgid "" | 6 | msgid "" |
| 586 | 7 | msgstr "" | 7 | msgstr "" |
| 587 | 8 | "Project-Id-Version: ubuntu-devices-help\n" | 8 | "Project-Id-Version: ubuntu-devices-help\n" |
| 588 | @@ -14,13 +14,8 @@ | |||
| 589 | 14 | "MIME-Version: 1.0\n" | 14 | "MIME-Version: 1.0\n" |
| 590 | 15 | "Content-Type: text/plain; charset=UTF-8\n" | 15 | "Content-Type: text/plain; charset=UTF-8\n" |
| 591 | 16 | "Content-Transfer-Encoding: 8bit\n" | 16 | "Content-Transfer-Encoding: 8bit\n" |
| 592 | 17 | "X-Generator: Launchpad (build 17361)\n" | ||
| 593 | 17 | "X-Launchpad-Export-Date: 2015-02-28 06:41+0000\n" | 18 | "X-Launchpad-Export-Date: 2015-02-28 06:41+0000\n" |
| 594 | 18 | "X-Generator: Launchpad (build 17361)\n" | ||
| 595 | 19 | |||
| 596 | 20 | #. type: Plain text | ||
| 597 | 21 | #: content/pages/faq.md:2 | ||
| 598 | 22 | msgid "Title: Get your questions answered." | ||
| 599 | 23 | msgstr "" | ||
| 600 | 24 | 19 | ||
| 601 | 25 | #. type: Plain text | 20 | #. type: Plain text |
| 602 | 26 | #: content/pages/faq.md:5 | 21 | #: content/pages/faq.md:5 |
| 603 | @@ -32,7 +27,7 @@ | |||
| 604 | 32 | #. type: Bullet: ' * ' | 27 | #. type: Bullet: ' * ' |
| 605 | 33 | #: content/pages/faq.md:7 | 28 | #: content/pages/faq.md:7 |
| 606 | 34 | msgid "[Apps]({filename}apps.md)" | 29 | msgid "[Apps]({filename}apps.md)" |
| 608 | 35 | msgstr "" | 30 | msgstr "[Apps]({filename}apps.ro.md)" |
| 609 | 36 | 31 | ||
| 610 | 37 | #. type: Bullet: ' * ' | 32 | #. type: Bullet: ' * ' |
| 611 | 38 | #: content/pages/faq.md:7 | 33 | #: content/pages/faq.md:7 |
| 612 | @@ -40,11 +35,6 @@ | |||
| 613 | 40 | msgstr "" | 35 | msgstr "" |
| 614 | 41 | 36 | ||
| 615 | 42 | #. type: Plain text | 37 | #. type: Plain text |
| 616 | 43 | #: content/pages/index.md:2 | ||
| 617 | 44 | msgid "Title: Welcome to Help for Ubuntu for devices!" | ||
| 618 | 45 | msgstr "" | ||
| 619 | 46 | |||
| 620 | 47 | #. type: Plain text | ||
| 621 | 48 | #: content/pages/index.md:5 | 38 | #: content/pages/index.md:5 |
| 622 | 49 | msgid "" | 39 | msgid "" |
| 623 | 50 | "The world-wide Ubuntu community wants to give you the best possible " | 40 | "The world-wide Ubuntu community wants to give you the best possible " |
| 624 | @@ -75,17 +65,12 @@ | |||
| 625 | 75 | #: content/pages/index.md:12 | 65 | #: content/pages/index.md:12 |
| 626 | 76 | #, no-wrap | 66 | #, no-wrap |
| 627 | 77 | msgid "[Take me to the FAQ!]({filename}faq.md) \n" | 67 | msgid "[Take me to the FAQ!]({filename}faq.md) \n" |
| 629 | 78 | msgstr "" | 68 | msgstr "[Take me to the FAQ!]({filename}faq.ro.md) \n" |
| 630 | 79 | 69 | ||
| 631 | 80 | #. type: Plain text | 70 | #. type: Plain text |
| 632 | 81 | #: content/pages/index.md:14 | 71 | #: content/pages/index.md:14 |
| 633 | 82 | msgid "[Get in touch]({filename}get-in-touch.md)" | 72 | msgid "[Get in touch]({filename}get-in-touch.md)" |
| 640 | 83 | msgstr "" | 73 | msgstr "[Get in touch]({filename}get-in-touch.ro.md)" |
| 635 | 84 | |||
| 636 | 85 | #. type: Plain text | ||
| 637 | 86 | #: content/pages/apps.md:2 | ||
| 638 | 87 | msgid "Title: FAQ - Apps" | ||
| 639 | 88 | msgstr "" | ||
| 641 | 89 | 74 | ||
| 642 | 90 | #. type: Plain text | 75 | #. type: Plain text |
| 643 | 91 | #: content/pages/apps.md:5 | 76 | #: content/pages/apps.md:5 |
| 644 | @@ -124,11 +109,6 @@ | |||
| 645 | 124 | msgstr "" | 109 | msgstr "" |
| 646 | 125 | 110 | ||
| 647 | 126 | #. type: Plain text | 111 | #. type: Plain text |
| 648 | 127 | #: content/pages/get-in-touch.md:2 | ||
| 649 | 128 | msgid "Title: Get in touch" | ||
| 650 | 129 | msgstr "" | ||
| 651 | 130 | |||
| 652 | 131 | #. type: Plain text | ||
| 653 | 132 | #: content/pages/get-in-touch.md:7 | 112 | #: content/pages/get-in-touch.md:7 |
| 654 | 133 | #, no-wrap | 113 | #, no-wrap |
| 655 | 134 | msgid "" | 114 | msgid "" |
| 656 | @@ -147,3 +127,35 @@ | |||
| 657 | 147 | "out about all the individual teams in Ubuntu, what they do, where they hang " | 127 | "out about all the individual teams in Ubuntu, what they do, where they hang " |
| 658 | 148 | "out and how to get involved." | 128 | "out and how to get involved." |
| 659 | 149 | msgstr "" | 129 | msgstr "" |
| 660 | 130 | |||
| 661 | 131 | #. type: Plain text | ||
| 662 | 132 | #: content/pages/faq.md:2 | ||
| 663 | 133 | msgid "Get your questions answered." | ||
| 664 | 134 | msgstr "" | ||
| 665 | 135 | |||
| 666 | 136 | #. type: Plain text | ||
| 667 | 137 | #: content/pages/index.md:2 | ||
| 668 | 138 | msgid "Welcome to Help for Ubuntu for devices!" | ||
| 669 | 139 | msgstr "" | ||
| 670 | 140 | |||
| 671 | 141 | #. type: Plain text | ||
| 672 | 142 | #: content/pages/apps.md:2 | ||
| 673 | 143 | msgid "FAQ - Apps" | ||
| 674 | 144 | msgstr "" | ||
| 675 | 145 | |||
| 676 | 146 | #. type: Plain text | ||
| 677 | 147 | #: content/pages/get-in-touch.md:2 | ||
| 678 | 148 | msgid "Get in touch" | ||
| 679 | 149 | msgstr "" | ||
| 680 | 150 | |||
| 681 | 151 | #~ msgid "Title: Get your questions answered." | ||
| 682 | 152 | #~ msgstr "" | ||
| 683 | 153 | |||
| 684 | 154 | #~ msgid "Title: Welcome to Help for Ubuntu for devices!" | ||
| 685 | 155 | #~ msgstr "" | ||
| 686 | 156 | |||
| 687 | 157 | #~ msgid "Title: FAQ - Apps" | ||
| 688 | 158 | #~ msgstr "" | ||
| 689 | 159 | |||
| 690 | 160 | #~ msgid "Title: Get in touch" | ||
| 691 | 161 | #~ msgstr "" | ||
| 692 | 150 | 162 | ||
| 693 | === modified file 'edit-here/translations.py' | |||
| 694 | --- edit-here/translations.py 2015-02-26 15:56:31 +0000 | |||
| 695 | +++ edit-here/translations.py 2015-03-05 08:14:16 +0000 | |||
| 696 | @@ -7,12 +7,16 @@ | |||
| 697 | 7 | import subprocess | 7 | import subprocess |
| 698 | 8 | import sys | 8 | import sys |
| 699 | 9 | 9 | ||
| 700 | 10 | |||
| 701 | 11 | def require(package): | ||
| 702 | 12 | print('Missing prerequisites. Please run: ' | ||
| 703 | 13 | '"sudo apt install %s"' % package) | ||
| 704 | 14 | sys.exit(1) | ||
| 705 | 15 | |||
| 706 | 10 | try: | 16 | try: |
| 707 | 11 | import polib | 17 | import polib |
| 708 | 12 | except ImportError: | 18 | except ImportError: |
| 712 | 13 | print('Missing prerequisites. Please run: ' | 19 | require('python3-polib') |
| 710 | 14 | '"sudo apt install python3-polib"') | ||
| 711 | 15 | sys.exit(1) | ||
| 713 | 16 | 20 | ||
| 714 | 17 | from pelicanconf import PATH | 21 | from pelicanconf import PATH |
| 715 | 18 | 22 | ||
| 716 | @@ -26,17 +30,22 @@ | |||
| 717 | 26 | ) | 30 | ) |
| 718 | 27 | 31 | ||
| 719 | 28 | 32 | ||
| 720 | 33 | def find_bcp47_code(gettext_code): | ||
| 721 | 34 | if gettext_code not in [c[0] for c in BCP47_OVERRIDES]: | ||
| 722 | 35 | return gettext_code.lower().replace('_', '-') | ||
| 723 | 36 | return [c[1] for c in BCP47_OVERRIDES | ||
| 724 | 37 | if c[0] == gettext_code][0] | ||
| 725 | 38 | |||
| 726 | 39 | |||
| 727 | 29 | class PO4A(object): | 40 | class PO4A(object): |
| 729 | 30 | def __init__(self, pot_file): | 41 | def __init__(self): |
| 730 | 31 | self.default_args = [ | 42 | self.default_args = [ |
| 731 | 32 | '-f', 'text', | 43 | '-f', 'text', |
| 732 | 33 | '-o', 'markdown', | 44 | '-o', 'markdown', |
| 733 | 34 | '-M', 'utf-8', | 45 | '-M', 'utf-8', |
| 734 | 35 | ] | 46 | ] |
| 735 | 36 | self.pot_file = pot_file | ||
| 736 | 37 | if not shutil.which('po4a'): | 47 | if not shutil.which('po4a'): |
| 739 | 38 | print('Missing prerequisites. Please run: "sudo apt install po4a"') | 48 | require('po4a') |
| 738 | 39 | sys.exit(1) | ||
| 740 | 40 | 49 | ||
| 741 | 41 | def run(self, po4a_command, additional_args, with_output=False): | 50 | def run(self, po4a_command, additional_args, with_output=False): |
| 742 | 42 | args = copy.copy(self.default_args) | 51 | args = copy.copy(self.default_args) |
| 743 | @@ -47,163 +56,217 @@ | |||
| 744 | 47 | ret = subprocess.call([po4a_command]+args) | 56 | ret = subprocess.call([po4a_command]+args) |
| 745 | 48 | return ret | 57 | return ret |
| 746 | 49 | 58 | ||
| 748 | 50 | def gettextize(self, documents): | 59 | def gettextize(self, document_fns, pot_file): |
| 749 | 51 | args = [] | 60 | args = [] |
| 752 | 52 | for document in documents: | 61 | for document_fn in document_fns: |
| 753 | 53 | args += ['-m', document] | 62 | args += ['-m', document_fn] |
| 754 | 54 | args += [ | 63 | args += [ |
| 756 | 55 | '-p', self.pot_file, | 64 | '-p', pot_file, |
| 757 | 56 | '-L', 'utf-8', | 65 | '-L', 'utf-8', |
| 758 | 57 | ] | 66 | ] |
| 773 | 58 | return self.run('po4a-gettextize', args) | 67 | ret = self.run('po4a-gettextize', args) |
| 774 | 59 | 68 | return (not ret) | |
| 775 | 60 | def updatepo(self, langs, documents): | 69 | |
| 776 | 61 | for lang in langs: | 70 | def translate(self, doc, po_fn): |
| 763 | 62 | args = [] | ||
| 764 | 63 | for document in documents: | ||
| 765 | 64 | args += ['-m', document] | ||
| 766 | 65 | args += ['-p', lang.file_name] | ||
| 767 | 66 | ret = self.run('po4a-updatepo', args) | ||
| 768 | 67 | if ret: | ||
| 769 | 68 | return False | ||
| 770 | 69 | return True | ||
| 771 | 70 | |||
| 772 | 71 | def translate(self, doc, lang): | ||
| 777 | 72 | args = [ | 71 | args = [ |
| 778 | 73 | '-k', TRANSLATION_COMPLETION_PERCENTAGE, | 72 | '-k', TRANSLATION_COMPLETION_PERCENTAGE, |
| 779 | 74 | '-m', doc, | 73 | '-m', doc, |
| 781 | 75 | '-p', lang.file_name, | 74 | '-p', po_fn, |
| 782 | 76 | '-L', 'utf-8', | 75 | '-L', 'utf-8', |
| 783 | 77 | ] | 76 | ] |
| 784 | 78 | return self.run('po4a-translate', args, with_output=True) | 77 | return self.run('po4a-translate', args, with_output=True) |
| 785 | 79 | 78 | ||
| 786 | 80 | 79 | ||
| 787 | 80 | class POFile(object): | ||
| 788 | 81 | def __init__(self, po_fn): | ||
| 789 | 82 | self.po_fn = po_fn | ||
| 790 | 83 | self.pofile = polib.pofile(po_fn) | ||
| 791 | 84 | |||
| 792 | 85 | def merge(self, pot_file_ob): | ||
| 793 | 86 | self.pofile.merge(pot_file_ob) | ||
| 794 | 87 | |||
| 795 | 88 | def save(self): | ||
| 796 | 89 | self.pofile.save(self.po_fn) | ||
| 797 | 90 | |||
| 798 | 91 | def find_in_msgid(self, find_str, translated=True, fuzzy=True, | ||
| 799 | 92 | untranslated=True): | ||
| 800 | 93 | entries = [] | ||
| 801 | 94 | if translated: | ||
| 802 | 95 | entries += self.pofile.translated_entries() | ||
| 803 | 96 | if fuzzy: | ||
| 804 | 97 | entries += self.pofile.fuzzy_entries() | ||
| 805 | 98 | if untranslated: | ||
| 806 | 99 | entries += self.pofile.untranslated_entries() | ||
| 807 | 100 | results = [] | ||
| 808 | 101 | for entry in entries: | ||
| 809 | 102 | if find_str in entry.msgid: | ||
| 810 | 103 | results += [entry] | ||
| 811 | 104 | return results | ||
| 812 | 105 | |||
| 813 | 106 | def replace_title_lines(self): | ||
| 814 | 107 | results = {} | ||
| 815 | 108 | for entry in self.find_in_msgid('Title: '): | ||
| 816 | 109 | if entry.msgid.startswith('Title: '): | ||
| 817 | 110 | if entry.linenum != 1: | ||
| 818 | 111 | print('Title line "%s" found, but at linenum "%s", ' | ||
| 819 | 112 | 'not 1.' % (entry.msgid, entry.linenum)) | ||
| 820 | 113 | return False | ||
| 821 | 114 | entry.msgid = entry.msgid.replace('Title: ', '') | ||
| 822 | 115 | fn = entry.occurrences[0][0] | ||
| 823 | 116 | results[fn] = entry.msgid | ||
| 824 | 117 | if self.po_fn.endswith('.po'): | ||
| 825 | 118 | entry.msgstr = '' | ||
| 826 | 119 | self.save() | ||
| 827 | 120 | return True | ||
| 828 | 121 | |||
| 829 | 122 | def rewrite_links(self, documents, bcp47): | ||
| 830 | 123 | link_regex = r'\[.+?\]\(\{filename\}(.+?)\)' | ||
| 831 | 124 | for entry in self.find_in_msgid('{filename}'): | ||
| 832 | 125 | link_msgid = re.findall(link_regex, entry.msgid)[0] | ||
| 833 | 126 | link_msgstr = list(re.findall(link_regex, entry.msgstr)) | ||
| 834 | 127 | translated_doc_fn = os.path.basename( | ||
| 835 | 128 | documents.translated_doc_fn(link_msgid, bcp47)) | ||
| 836 | 129 | if not link_msgstr: | ||
| 837 | 130 | entry.msgstr = entry.msgid | ||
| 838 | 131 | link_msgstr = [link_msgid] | ||
| 839 | 132 | entry.msgstr = entry.msgstr.replace(link_msgstr[0], | ||
| 840 | 133 | translated_doc_fn) | ||
| 841 | 134 | self.save() | ||
| 842 | 135 | |||
| 843 | 136 | def find_translated_title_line(self, original_title): | ||
| 844 | 137 | for entry in self.find_in_msgid(original_title): | ||
| 845 | 138 | if entry.msgid == original_title: | ||
| 846 | 139 | if entry.msgstr: | ||
| 847 | 140 | return entry.msgstr | ||
| 848 | 141 | return entry.msgid | ||
| 849 | 142 | |||
| 850 | 143 | |||
| 851 | 144 | class PO(object): | ||
| 852 | 145 | def __init__(self, po4a): | ||
| 853 | 146 | self.translations_dir = os.path.abspath(os.path.join(PATH, '../po')) | ||
| 854 | 147 | self.fake_lang_code = 'en_US' | ||
| 855 | 148 | self.fake_po_fn = os.path.join(self.translations_dir, | ||
| 856 | 149 | '%s.po' % self.fake_lang_code) | ||
| 857 | 150 | self.pot_fn = os.path.join(self.translations_dir, 'help.pot') | ||
| 858 | 151 | self.pot_file_ob = POFile(self.pot_fn) | ||
| 859 | 152 | self.po4a = po4a | ||
| 860 | 153 | self.langs = {} | ||
| 861 | 154 | for po_fn in glob.glob(self.translations_dir+'/*.po'): | ||
| 862 | 155 | self.add_language(po_fn) | ||
| 863 | 156 | |||
| 864 | 157 | def add_language(self, po_fn): | ||
| 865 | 158 | gettext_code = os.path.basename(po_fn).split('.po')[0] | ||
| 866 | 159 | self.langs[po_fn] = { | ||
| 867 | 160 | 'bcp47': find_bcp47_code(gettext_code), | ||
| 868 | 161 | 'gettext_code': gettext_code, | ||
| 869 | 162 | 'pofile': None, | ||
| 870 | 163 | } | ||
| 871 | 164 | |||
| 872 | 165 | def _remove_fake_po_file(self): | ||
| 873 | 166 | if os.path.exists(self.fake_po_fn): | ||
| 874 | 167 | os.remove(self.fake_po_fn) | ||
| 875 | 168 | |||
| 876 | 169 | def __del__(self): | ||
| 877 | 170 | self._remove_fake_po_file() | ||
| 878 | 171 | |||
| 879 | 172 | def load_pofile(self, po_fn): | ||
| 880 | 173 | if not self.langs[po_fn]['pofile']: | ||
| 881 | 174 | self.langs[po_fn]['pofile'] = POFile(po_fn) | ||
| 882 | 175 | |||
| 883 | 176 | def generate_pot_file(self, documents): | ||
| 884 | 177 | if not self.po4a.gettextize(documents.docs, self.pot_fn): | ||
| 885 | 178 | return False | ||
| 886 | 179 | if not self.pot_file_ob.replace_title_lines(): | ||
| 887 | 180 | return False | ||
| 888 | 181 | for po_fn in self.langs: | ||
| 889 | 182 | self.load_pofile(po_fn) | ||
| 890 | 183 | self.langs[po_fn]['pofile'].merge(self.pot_file_ob.pofile) | ||
| 891 | 184 | if not self.langs[po_fn]['pofile'].replace_title_lines(): | ||
| 892 | 185 | return False | ||
| 893 | 186 | return True | ||
| 894 | 187 | |||
| 895 | 188 | # we generate a fake translation for en-US which is going to be | ||
| 896 | 189 | # the default | ||
| 897 | 190 | def generate_fake_pofile(self): | ||
| 898 | 191 | self._remove_fake_po_file() | ||
| 899 | 192 | shutil.copy(self.pot_fn, self.fake_po_fn) | ||
| 900 | 193 | self.add_language(self.fake_po_fn) | ||
| 901 | 194 | |||
| 902 | 195 | def find_translated_title_line(self, original_title, po_fn): | ||
| 903 | 196 | return self.langs[po_fn]['pofile'].find_translated_title_line( | ||
| 904 | 197 | original_title) | ||
| 905 | 198 | |||
| 906 | 199 | def rewrite_links(self, documents): | ||
| 907 | 200 | for po_fn in self.langs: | ||
| 908 | 201 | self.load_pofile(po_fn) | ||
| 909 | 202 | self.langs[po_fn]['pofile'].rewrite_links( | ||
| 910 | 203 | documents, self.langs[po_fn]['bcp47']) | ||
| 911 | 204 | |||
| 912 | 205 | |||
| 913 | 81 | class Documents(object): | 206 | class Documents(object): |
| 914 | 82 | def __init__(self): | 207 | def __init__(self): |
| 915 | 83 | self.docs = [] | 208 | self.docs = [] |
| 919 | 84 | for dirpath, dirnames, filenames in os.walk(PATH): | 209 | for dirpath, dirnames, fns in os.walk(PATH): |
| 920 | 85 | for filename in filenames: | 210 | for fn in fns: |
| 921 | 86 | self.docs += [os.path.join(dirpath, filename)] | 211 | fn = os.path.relpath(os.path.join(dirpath, fn), |
| 922 | 212 | os.path.join(PATH, '..')) | ||
| 923 | 213 | self.docs += [fn] | ||
| 924 | 87 | 214 | ||
| 926 | 88 | def translated_doc(self, file_name, lang): | 215 | def translated_doc_fn(self, fn, bcp47_code): |
| 927 | 89 | match = [doc for doc in self.docs | 216 | match = [doc for doc in self.docs |
| 929 | 90 | if os.path.basename(doc) == os.path.basename(file_name)] | 217 | if os.path.basename(doc) == os.path.basename(fn)] |
| 930 | 91 | if not match: | 218 | if not match: |
| 931 | 92 | return None | 219 | return None |
| 932 | 93 | return '%s.%s.md' % (match[0].split('.md')[0], | 220 | return '%s.%s.md' % (match[0].split('.md')[0], |
| 992 | 94 | lang.bcp47_code) | 221 | bcp47_code) |
| 993 | 95 | 222 | ||
| 994 | 96 | def _call_po4a_translate(self, doc, lang, po4a): | 223 | def _call_po4a_translate(self, doc, po_fn, po4a): |
| 995 | 97 | res = po4a.translate(doc, lang) | 224 | res = po4a.translate(doc, po_fn) |
| 996 | 98 | output = codecs.decode(res.communicate()[0]) | 225 | return codecs.decode(res.communicate()[0]) |
| 997 | 99 | broken_title_line = [line for line in output.split('\n') | 226 | |
| 998 | 100 | if line.lower().startswith('title:')][0] | 227 | def write_translated_markdown(self, po, po4a): |
| 999 | 101 | rest = [line for line in output.split('\n') | 228 | for po_fn in po.langs: |
| 1000 | 102 | if not line.lower().startswith('title')] | 229 | for doc_fn in self.docs: |
| 1001 | 103 | output = '\n'.join(rest) | 230 | output = self._call_po4a_translate(doc_fn, po_fn, po4a) |
| 1002 | 104 | return (broken_title_line, output) | 231 | title_line = output.split('\n')[0].split('Title: ')[1] |
| 1003 | 105 | 232 | translated_title_line = po.find_translated_title_line( | |
| 1004 | 106 | def write_translated_markdown(self, lang, po4a): | 233 | title_line, po_fn) |
| 1005 | 107 | for doc in self.docs: | 234 | output = '\n'.join([line for line in output.split('\n')][1:]) |
| 1006 | 108 | (broken_title_line, output) = \ | 235 | new_path = self.translated_doc_fn(doc_fn, |
| 1007 | 109 | self._call_po4a_translate(doc, lang, po4a) | 236 | po.langs[po_fn]['bcp47']) |
| 1008 | 110 | new_path = self.translated_doc(doc, lang) | 237 | text = "Title: %s\nDate:\n\n" % (translated_title_line) |
| 1009 | 111 | text = "%s\nDate:\n\n" % (broken_title_line) | 238 | text += output |
| 1010 | 112 | text += output | 239 | if os.path.exists(new_path): |
| 1011 | 113 | if os.path.exists(new_path): | 240 | os.remove(new_path) |
| 1012 | 114 | os.remove(new_path) | 241 | if not os.path.exists(os.path.dirname(new_path)): |
| 1013 | 115 | if not os.path.exists(os.path.dirname(new_path)): | 242 | os.makedirs(os.path.dirname(new_path)) |
| 1014 | 116 | os.makedirs(os.path.dirname(new_path)) | 243 | with open(new_path, 'w', encoding='utf-8') as f: |
| 1015 | 117 | with open(new_path, 'w', encoding='utf-8') as f: | 244 | f.write(text) |
| 957 | 118 | f.write(text) | ||
| 958 | 119 | |||
| 959 | 120 | |||
| 960 | 121 | class Language(object): | ||
| 961 | 122 | def __init__(self, po_file, documents): | ||
| 962 | 123 | self.file_name = po_file | ||
| 963 | 124 | self.gettext_code = os.path.basename(po_file).split('.po')[0] | ||
| 964 | 125 | self.bcp47_code = self._find_bcp47_code() | ||
| 965 | 126 | self.documents = documents | ||
| 966 | 127 | |||
| 967 | 128 | def _find_bcp47_code(self): | ||
| 968 | 129 | if self.gettext_code not in [c[0] for c in BCP47_OVERRIDES]: | ||
| 969 | 130 | return self.gettext_code.lower().replace('_', '-') | ||
| 970 | 131 | return [c[1] for c in BCP47_OVERRIDES | ||
| 971 | 132 | if c[0] == self.gettext_code][0] | ||
| 972 | 133 | |||
| 973 | 134 | def rewrite_links(self): | ||
| 974 | 135 | po_file = polib.pofile(self.file_name) | ||
| 975 | 136 | link_regex = r'\[.+?\]\(\{filename\}(.+?)\)' | ||
| 976 | 137 | for entry_group in [po_file.translated_entries(), | ||
| 977 | 138 | po_file.fuzzy_entries(), | ||
| 978 | 139 | po_file.untranslated_entries()]: | ||
| 979 | 140 | for entry in entry_group: | ||
| 980 | 141 | if '{filename}' in entry.msgid: | ||
| 981 | 142 | link_msgid = re.findall(link_regex, entry.msgid)[0] | ||
| 982 | 143 | link_msgstr = list(re.findall(link_regex, entry.msgstr)) | ||
| 983 | 144 | translated_doc = os.path.basename( | ||
| 984 | 145 | self.documents.translated_doc( | ||
| 985 | 146 | link_msgid, self)) | ||
| 986 | 147 | if not link_msgstr: | ||
| 987 | 148 | entry.msgstr = entry.msgid | ||
| 988 | 149 | link_msgstr = [link_msgid] | ||
| 989 | 150 | entry.msgstr = entry.msgstr.replace(link_msgstr[0], | ||
| 990 | 151 | translated_doc) | ||
| 991 | 152 | po_file.save(self.file_name) | ||
| 1016 | 153 | 245 | ||
| 1017 | 154 | 246 | ||
| 1018 | 155 | class Translations(object): | 247 | class Translations(object): |
| 1019 | 156 | def __init__(self): | 248 | def __init__(self): |
| 1020 | 157 | self._cleanup() | 249 | self._cleanup() |
| 1021 | 158 | self.translations_dir = os.path.abspath(os.path.join(PATH, '../po')) | ||
| 1022 | 159 | self.available_languages = [] | ||
| 1023 | 160 | self.documents = Documents() | 250 | self.documents = Documents() |
| 1036 | 161 | for po_filename in glob.glob(self.translations_dir+'/*.po'): | 251 | self.po4a = PO4A() |
| 1037 | 162 | self.available_languages += [Language(po_filename, self.documents)] | 252 | self.po = PO(self.po4a) |
| 1026 | 163 | self.fake_lang_code = 'en_US' | ||
| 1027 | 164 | self.fake_po_file = os.path.join(self.translations_dir, | ||
| 1028 | 165 | '%s.po' % self.fake_lang_code) | ||
| 1029 | 166 | self.pot_file = os.path.join(self.translations_dir, | ||
| 1030 | 167 | "help.pot") | ||
| 1031 | 168 | self.po4a = PO4A(self.pot_file) | ||
| 1032 | 169 | |||
| 1033 | 170 | def __del__(self): | ||
| 1034 | 171 | if os.path.exists(self.fake_po_file): | ||
| 1035 | 172 | os.remove(self.fake_po_file) | ||
| 1038 | 173 | 253 | ||
| 1039 | 174 | def _cleanup(self): | 254 | def _cleanup(self): |
| 1040 | 175 | r = subprocess.Popen(['bzr', 'ignored'], stdout=subprocess.PIPE) | 255 | r = subprocess.Popen(['bzr', 'ignored'], stdout=subprocess.PIPE) |
| 1046 | 176 | files = [os.path.join(PATH, '../..', f.split(' ')[0]) | 256 | fns = [os.path.join(PATH, '../..', f.split(' ')[0]) |
| 1047 | 177 | for f in codecs.decode(r.communicate()[0]).split('\n') | 257 | for f in codecs.decode(r.communicate()[0]).split('\n') |
| 1048 | 178 | if f.strip() != ''] | 258 | if f.strip() != ''] |
| 1049 | 179 | files = [f for f in files if os.path.exists(f)] | 259 | fns = [f for f in fns if os.path.exists(f)] |
| 1050 | 180 | for f in files: | 260 | for f in fns: |
| 1051 | 181 | try: | 261 | try: |
| 1052 | 182 | shutil.rmtree(f) | 262 | shutil.rmtree(f) |
| 1053 | 183 | except NotADirectoryError: | 263 | except NotADirectoryError: |
| 1054 | 184 | os.remove(f) | 264 | os.remove(f) |
| 1055 | 185 | 265 | ||
| 1056 | 186 | def generate_pot_file(self): | 266 | def generate_pot_file(self): |
| 1076 | 187 | return self.po4a.gettextize(self.documents.docs) | 267 | return self.po.generate_pot_file(self.documents) |
| 1058 | 188 | |||
| 1059 | 189 | def update_po_files(self): | ||
| 1060 | 190 | return self.po4a.updatepo(self.available_languages, | ||
| 1061 | 191 | self.documents.docs) | ||
| 1062 | 192 | |||
| 1063 | 193 | def rewrite_links(self): | ||
| 1064 | 194 | self._generate_fake_pofile() | ||
| 1065 | 195 | for lang in self.available_languages: | ||
| 1066 | 196 | lang.rewrite_links() | ||
| 1067 | 197 | |||
| 1068 | 198 | # we generate a fake translation for en-US which is going to be | ||
| 1069 | 199 | # the default | ||
| 1070 | 200 | def _generate_fake_pofile(self): | ||
| 1071 | 201 | if os.path.exists(self.fake_po_file): | ||
| 1072 | 202 | os.remove(self.fake_po_file) | ||
| 1073 | 203 | shutil.copy(self.pot_file, self.fake_po_file) | ||
| 1074 | 204 | self.available_languages += [Language(self.fake_po_file, | ||
| 1075 | 205 | self.documents)] | ||
| 1077 | 206 | 268 | ||
| 1078 | 207 | def generate_translations(self): | 269 | def generate_translations(self): |
| 1081 | 208 | for lang in self.available_languages: | 270 | self.po.generate_fake_pofile() |
| 1082 | 209 | self.documents.write_translated_markdown(lang, self.po4a) | 271 | self.po.rewrite_links(self.documents) |
| 1083 | 272 | self.documents.write_translated_markdown(self.po, self.po4a) | ||
Looks good to me, just two inline comments.