Merge lp:~dholbach/help-app/1425010 into lp:~ubuntu-touch-coreapps-drivers/help-app/trunk
| Status: | Merged |
|---|---|
| Merged at revision: | 54 |
| Proposed branch: | lp:~dholbach/help-app/1425010 |
| Merge into: | lp:~ubuntu-touch-coreapps-drivers/help-app/trunk |
| Diff against target: |
427 lines (+109/-125) 11 files modified
.bzrignore (+2/-1) Makefile (+0/-1) edit-here/Makefile (+1/-0) edit-here/content/pages/apps.md (+0/-1) edit-here/content/pages/faq.md (+0/-1) edit-here/content/pages/get-in-touch.md (+0/-1) edit-here/content/pages/index.md (+0/-1) edit-here/generate-pot (+0/-2) edit-here/pelicanconf.py (+6/-4) edit-here/po/de.po (+3/-3) edit-here/translations.py (+97/-110) |
| To merge this branch: | bzr merge lp:~dholbach/help-app/1425010 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Daniel Holbach (community) | Approve on 2015-02-26 | ||
| David Planella | 2015-02-24 | Needs Fixing on 2015-02-26 | |
|
Review via email:
|
|||
Description of the Change
This is not a complete fix for bug 1425010, but is where I got stuck for now. Links are broken again.
- 83. By Daniel Holbach on 2015-02-25
-
add code for adding a fake en-US profile - write translated files to pages/<
lang>/< file.md> - 84. By Daniel Holbach on 2015-02-25
-
define location of .pot file just once
- 85. By Daniel Holbach on 2015-02-25
-
rewrite links again, we are going to go with the solution of <filename>
.<lang> .html, change paths accordingly - 86. By Daniel Holbach on 2015-02-25
-
remove stray print statements
- 87. By Daniel Holbach on 2015-02-25
-
don't generate pointless duplicates of our pages, the 'original' is the 'en-us' variant
- 88. By Daniel Holbach on 2015-02-25
-
make pep8 happy
- 89. By Daniel Holbach on 2015-02-25
-
update .bzrignore list
- 90. By Daniel Holbach on 2015-02-25
-
remove 'lang' from markdown files and its special-casing, we get it for free from the generated filenames - we can likely remove more code now
- 91. By Daniel Holbach on 2015-02-25
-
remove unused code
- 92. By Daniel Holbach on 2015-02-25
-
simplify code some more
- 93. By Daniel Holbach on 2015-02-25
-
simplify Makefile logic ('make html' will work in top and 'edit-here' directory)
- 94. By Daniel Holbach on 2015-02-25
-
restructure functions in the translations classes to make more sense
- 95. By Daniel Holbach on 2015-02-25
-
make pep8 happy
- 96. By Daniel Holbach on 2015-02-26
-
rewrite links also for the case of en_US
| David Planella (dpm) wrote : | # |
This works well now. I've noticed something else, not sure if it needs to be fixed in this branch, though:
Whenever I click on the top-level 'de' links to switch to the German translation, the German pages contain an additional 'en' link that does not work. I think it should just be 'de' also for the German pages.
Translations: en-us en
Going forward, once we can load translations based on the user language, I'd recommend removing the translation links - languages should be set automatically for a smooth experience.
| Daniel Holbach (dholbach) wrote : | # |
I filed bug 1425924.
| Daniel Holbach (dholbach) wrote : | # |
<dholbach> dpm, the links were added automagically by pelican - I'll see what we can do and file a separate bug if that's ok
dpm, I think we're now at the point where we can start adding content, fixing the styling and everything else
dpm, shall I fix it in the same branch or in a separate branch?
<dpm> dholbach, yeah, let's do a separate branch
<dholbach> ok cool
I'll land the other one, ok?
<dpm> dholbach, yeah. ...

Looks good to me, although as discussed yesterday on IRC, I'm still not sure about creating the fake en_US translation.
For the broken links, it seems what is happening is that during the build pelican is trying to find e.g. faq.html, which is not built (we build faq.en-us.html instead) so it gets confused and outputs the link as './'. If the index.md file is modified as below, then the generated links work (but for English only).
[Take me to the FAQ!]({ filename} faq.en- us.md)