Commit Graph

213 Commits (9a8f738b813aea4653447e411ae0ccd384c01de6)

Author SHA1 Message Date
Joey Hess cc6000f0b9 both changes picked 2009-08-28 07:34:09 -04:00
intrigeri 8064acf87f doc/po: reported bug + patches wrt. created page type
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-08-28 13:20:33 +02:00
Joey Hess 18e4fa6539 fix merged 2009-08-27 15:54:44 -04:00
Joey Hess f8ad1bfec4 fix cherry-picked 2009-08-27 15:50:43 -04:00
Joey Hess ffcd97ce52 change cherry-picked; move to discussion 2009-08-27 15:49:12 -04:00
intrigeri eaa782a185 doc/po(self-links): follow-ups
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-08-27 20:38:36 +02:00
intrigeri 6bc3206af1 doc/po: follow-up 2009-08-27 20:21:16 +02:00
intrigeri 7d35d17f95 doc/po: follow-up
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-08-27 20:01:24 +02:00
Joey Hess 5e515b493c followups 2009-08-27 13:10:31 -04:00
Joey Hess e1acb707db cherry-picked fix for recentchanges links 2009-08-27 12:57:04 -04:00
Joey Hess 18fc71f033 unsure if this patch is enough 2009-08-27 12:56:24 -04:00
Joey Hess 4ce93af516 translation of directives 2009-08-26 13:09:43 -04:00
intrigeri d5a04b2de9 po: more TODO items comments and patches 2009-08-26 02:00:48 -04:00
intrigeri 7bd7e78e4a po: commenting some TODO items 2009-08-26 01:41:55 -04:00
intrigeri 145d89a6fc po: maybe fixed self links 2009-08-26 01:05:07 -04:00
Joey Hess f712ffa66d another issue 2009-08-19 14:12:37 -04:00
Joey Hess db041b8854 minor problem 2009-08-16 13:53:44 -04:00
Joey Hess 4ff3e2a540 po: Better fix for missing underlay translation problem.
If a page is taken from the underlay, and one of the specified languages
does not have po files in the underlay, it would create a broken link
to the translated version of the page for that language.

With this change, there's no broken link.
2009-08-15 22:18:05 -04:00
Joey Hess 0e4f67842a update 2009-08-15 21:00:27 -04:00
Joey Hess 7ea1f96926 apache config details 2009-08-15 19:39:51 -04:00
Joey Hess 7d901b9a54 another problem.. 2009-08-15 19:16:22 -04:00
Joey Hess 43e895ec78 another problem 2009-08-15 17:29:05 -04:00
Joey Hess 1b63a0e4fa another problem 2009-08-15 16:15:36 -04:00
Joey Hess d13c07dec1 noticed a problem 2009-08-15 15:20:46 -04:00
Joey Hess 83480665c2 po: Fix copy of po file from underlay when editing
When first editing a page that was in the underlay, avoid losing
the translation by copying the po file over from the underlay.
2009-08-10 15:59:32 -04:00
Joey Hess 62dd02aa79 oddity 2009-07-21 13:21:16 +02:00
Joey Hess 8effd48854 one issue with basewiki translations 2009-07-21 12:43:48 +02:00
Joey Hess eca2dbe67f po: Add support for mo files in underlays
In order to support translated basewiki and other underlays, we need
support for mo files in underlays.

The code did not allow this before, because if a mo file was in an
underlay, then it might try to update it, and its pot, and write to the
underlay, which is guaranteed to either fail due to permissions, or be
undesirable.

To fix, my approach is to just detect if a mo or pot file that is about to
be updated is in an underlay, and skip updating it. This seems to work
well:

- If the mo is out of date in the underlay, it won't get updated, but this
  would probably be due to a problem in the underlay, or more likely,
  the wiki is being rebuilt and so it *thinks* the mo is out of date,
  but it's really not (and it would be a waste of time to rebuild it
  anyway).
- If a page from the basewiki is edited, it is saved to the srcdir,
  which causes generation of an updated mo and pot also in the srcdir;
  the underlay stops being used for that page, and everything seems
  to work.

Note that I am not including an underlay search directory for pot files.
They *seem* to be unnecessary for the underlay, since the mo files
in there never need to be updated.
2009-07-21 11:31:51 +02:00
Joey Hess a7b813182d build translated underlays for use with non-English wikis 2009-07-20 07:20:13 +02:00
Joey Hess 741c33576e create translated underlays in mdwn format
These are for use by wikis where the primary language is not English.
On such a wiki, it makes sense to use an underlay has the source for pages
in the native language.
2009-07-20 06:23:33 +02:00
Joey Hess 7d56f17891 more thoughts on underlays 2009-07-20 04:54:25 +02:00
Joey Hess 7865433d8e update, think I have the real bug this time 2009-07-20 00:11:56 +02:00
Joey Hess a7e5541c4d %links dedup bug? 2009-07-19 23:55:58 +02:00
Joey Hess 54280d0215 bad po plugin bug 2009-07-19 23:01:43 +02:00
Joey Hess 1a4750b76b language display order 2009-07-19 18:27:20 +02:00
Joey Hess 43e5c905cb shut up msgmerge 2009-07-19 16:54:03 +02:00
Joey Hess 4d166acccb new minor bug 2009-07-19 13:58:15 +02:00
Joey Hess ea8c166a05 bugfix: Avoid generating po files for files that are not httmlizable 2009-07-19 13:46:10 +02:00
Joey Hess f5d7d2f02d add a bug 2009-07-19 13:42:27 +02:00
Joey Hess b62dc0a3d8 s/castellano/español/ 2009-07-19 13:06:47 +02:00
Joey Hess 9ec492ccd1 move robustness tests section to discussion 2009-07-19 13:04:09 +02:00
Joey Hess a6dabc247f fix link 2009-07-19 12:51:15 +02:00
intrigeri 055be361f5 page.tmpl: use OTHERLANGUAGES and PERCENTTRANSLATED
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-03-28 11:41:21 +01:00
Joey Hess e1e936d27c link changes 2009-03-27 15:51:29 -04:00
intrigeri 0314ed459b po/todo: drop a note about my meta-po branch
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-27 19:35:38 +01:00
intrigeri dcb5253091 po/todo: take note of the commit that will need to be reverted later
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-27 17:55:46 +01:00
intrigeri ea753782b2 po: remove all dependencies on nicepagetitle
... as my meta branch probably won't be merged before the po plugin is, contrary
to what I was originally supposing.

This implies removing the po_translation_status_in_links and
po_strictly_refresh_backlinks options.

Added a note to the TODO section to think of bringing these features back later,
as they really enhance user experience on a translatable wiki.

Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-27 17:52:32 +01:00
intrigeri ca9e45c3ba po: make the "backlinks involve dependencies" feature optional
It can now be configured with the po_strictly_refresh_backlinks setting.

Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-27 00:25:46 +01:00
intrigeri 190ea1d47f plugins/po: talk about the po4a version in the first lines
... as it seems it can be missed if I keep it only in the security section.

Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-26 23:12:16 +01:00
intrigeri 40de619d49 po(doc): moved security analysis to its own page
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-17 13:50:19 +01:00
intrigeri df82b5e62a po: when possible, disable use of Text::WrapI18N in po4a; else warn about too old po4a
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-16 15:07:05 +01:00
intrigeri 7919e70282 po(todo): more test results
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-15 23:06:11 +01:00
intrigeri 3ba976d1d3 po: pages in underlay dirs are not translatable
Fixes build break due to read-only underlay dirs, e.g. basewiki.

Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-15 23:04:57 +01:00
intrigeri 7ca396d6ee po/todo: some testing results
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-15 21:32:22 +01:00
intrigeri 48de7f9c7b po: more security-related reports
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-15 20:01:54 +01:00
intrigeri c8e3136d00 po/todo: update
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-02 18:59:07 +01:00
intrigeri 226c61f1aa po/todo: update
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-02 17:25:54 +01:00
intrigeri fae3cef41a po(formbuilder_setup): remove the rename/remove buttons on slave pages
This has to be done after the rename/remove plugins have added
their buttons, so we set this hook to be run last.

The canrename/canremove hooks already ensure this is forbidden
at the backend level, so this is only UI sugar.

Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-02 16:02:25 +01:00
intrigeri 226abb373a po/todo: update
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-02 15:14:49 +01:00
intrigeri 586e6e3362 po/todo: remove silly ideas.
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-02 14:18:40 +01:00
intrigeri 724dbabc4a po: do not allow to create pages of type po
The main reason to do so is to bypass the "favor the type of linking page on
page creation" logic, which is unsuitable when a broken link is clicked on
a slave (PO) page.

Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-02 14:09:34 +01:00
intrigeri 12178c2a64 po/todo: added better implementation ideas
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-02 13:43:08 +01:00
intrigeri 07c6a6a1fc po/todo: remove completed item
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-02 12:50:51 +01:00
intrigeri f0e2ce4360 po/todo: added bugreport about new page's type
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-02 12:14:55 +01:00
intrigeri 6fe1e3b66d po/todo: update
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01 23:36:57 +01:00
intrigeri c821cee108 po(cansave): check PO validity using new isvalidpo function
... because Po4a's parser does not care about malformed PO data.
Use gettext's msgfmt program instead.

Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01 23:12:08 +01:00
intrigeri 09d0321f15 po(TODO): the plugin code will need to be gettextized, at some point
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01 22:18:27 +01:00
intrigeri b24f236dfa po: use the new canrename hook to prevent translation renames in the CGI
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01 16:52:43 +01:00
intrigeri 5852f03efa po(todo): test results for markup languages support, thoughts about renaming/deleting
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01 16:18:37 +01:00
intrigeri 85f865b5d9 po: added postscan hook, to make pages depend on the pages linking to them
... so that nicepagetitle hook's effects, such as translation status displayed
in links, are updated when the linked page changes.

The replacement of 'my %backlinks' with 'our %backlinks' in Render.pm made this
work: previously, every postscan hook was called with an almost empty
%backlinks, which defeated all my attempts to implement this feature.

This feature hits performance a bit. Its cost was quite small in my real-world
use-cases (a few percents bigger refresh time), but could be bigger in worst
cases. Time will tell.

NB: this hack could also be used by my meta branch. It may even be a ikiwiki
optional feature.

Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01 01:08:10 +01:00
intrigeri bbeb9a4a14 po/todo: reflect current link-related work status
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-12-31 17:10:33 +01:00
intrigeri c0c6b8d79e po/todo: reflect current status of links-related work
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-12-31 15:23:59 +01:00
intrigeri 149a3e65a7 po: fix redirect after edit, using a somehow tricky hack
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-12-31 13:02:48 +01:00
intrigeri bd10381103 po: delete translations of deleted master pages
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-12-31 11:47:18 +01:00
intrigeri 40324175aa po/todo: added test results
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-13 00:54:46 +01:00
intrigeri 190c641c8a po(otherlanguages): return pages that should exist
... instead of already existing ones.
This fixes the "missing otherlanguages links on master pages just created via
the CGI" bug.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 23:27:30 +01:00
intrigeri 10c4e858b8 po(change): flush Memoize cache, to fix bug after rename/remove
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 21:18:48 +01:00
intrigeri 776be85a22 po/todo: first pass of robustness tests, added todo for remove/rename
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 20:13:40 +01:00
intrigeri 86c58119e0 po/todo: added robustness tests that have to be done
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 15:54:20 +01:00
intrigeri eba2dee941 po: compute internal links from a slave page relative to its master page
e.g. a link appearing on a slave page links to its masterpage's subpages.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 15:04:50 +01:00
intrigeri b19d0d3d24 Merge commit 'upstream/po' into prv/po 2008-11-12 01:08:57 +01:00
Joey Hess 3937e1fb16 patch and a few comments 2008-11-11 18:33:04 -05:00
intrigeri ef536f46bd po/todo: bug report about linking to subpages from translation pages
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 23:08:13 +01:00
intrigeri b7a4e5a51c po/todo: fixed internal links
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 22:29:41 +01:00
intrigeri 18c086ec04 po/todo: added note about backlinks not being updated
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 20:04:58 +01:00
intrigeri 4c45dfce19 po/todo: update
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 17:30:19 +01:00
intrigeri f0e796d9a1 po(change): fix uninitialized variables when running IkiWiki::refresh()
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 16:04:40 +01:00
intrigeri 43a1d36378 po: added HOMEPAGEURL template variable, documented when to use it
Hopefully all links should now be consistent with the chosen linking behavior,
but who knows...

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 15:27:39 +01:00
intrigeri 18331e9261 po/todo: added bug report for weird Perl warnings
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 15:25:23 +01:00
intrigeri 6a9dafdc1d po/todo: updated page formats, broken links, documentation
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 05:17:26 +01:00
intrigeri f2dc003cfb po/doc: first fuzzy-testing results for po4a and msgmerge
Chapter #1, in which we learn po4a could help to DoS ikiwiki + po,
whereas msgmerge seems reluctant to cooperate.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-11 03:23:02 +01:00
intrigeri e397888a77 po/doc: more security research results
Apart of the fuzzying part, I'm done with what I can do without help.

The "Running po4a on untrusted content" section needs at least a quick glance
from an experimented Perl programmer.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 23:52:50 +01:00
intrigeri 44bb872a97 po/todo(security): many research results
... and some questions to Joey (hint: look for your name)

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-08 22:08:50 +01:00
intrigeri 41d13673c6 po/todo++: support other file formats than markdown
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-08 12:21:54 +01:00
intrigeri 86edd539f4 po/todo: mostly security research
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-08 02:13:37 +01:00
intrigeri 3c6c129100 po: started research on gettext/po4a security
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-08 00:08:44 +01:00
intrigeri a0ac346079 po: finished backlinks implementation
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 22:17:54 +01:00
intrigeri 34ab884242 po: implemented linking/backlinks specification for po_link_to=negotiated
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 21:27:00 +01:00
intrigeri 61a01d3388 po: write detailed specification of wished backlinks behaviour
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 16:33:28 +01:00
intrigeri daa04ae436 po: fix link to homepage in special case
... by wrapping IkiWiki::urlto in order to workaround hard-coded
/index.$config{htmlext}, which is wrong when usedirs=0 and po_link_to=current
and translatable homepage

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 17:28:04 +01:00