Commit Graph

172 Commits (407dff979ce253ca912ddd0869794e7402c32901)

Author SHA1 Message Date
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
intrigeri 8b001dbb00 po: redesign (once more) automatic POT/PO files update
Now use the change hook to update these files, check them into VCS, and trigger
IkiWiki::refresh as needed. The needsbuild hook's help was required to prevent
infinite looping.

This more rigorous way of doing this fixes recentchanges (that was previously
not updated in some cases), and probably is a better long-term solution than the
two previously tested ones.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 15:54:55 +01:00
intrigeri c8cc03c824 po: doc/todo update
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 14:22:54 +01:00
intrigeri 802be94104 po: use prep_writefile before creating any files in refreshpot and refreshpo
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 14:17:33 +01:00
intrigeri a4cbfce763 po: reported parentlinks misbehaviour in special case
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 14:12:05 +01:00
intrigeri 769be3d48e po: po_link_to is safe, and fallbacks to a working value if needed
warnings are displayed if it is set to an invalid or incompatible value
(e.g. po_link_to=negotiated and disabled usedirs)

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:47:09 +01:00
intrigeri 419de149a6 po: mark po_translatable_pages as a safe configuration setting
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:29:48 +01:00
intrigeri 34afa2c07d po: po_master_language and po_slave_languages are safe config settings
... and check their validity in checkconfig

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:26:45 +01:00
intrigeri c96dd00480 po: added license and copyright
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:01:33 +01:00
intrigeri 1f54c13ec2 Merge commit 'upstream/po' into prv/po
Conflicts:

	IkiWiki/Plugin/po.pm
	doc/plugins/po.mdwn

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 12:28:31 +01:00
Joey Hess fe580240d4 need license 2008-11-05 15:02:22 -05:00
Joey Hess b609ae76ed response 2008-11-05 14:58:35 -05:00
Joey Hess 6fbe214d91 fixed one security problem, two more need review 2008-11-05 14:47:50 -05:00
Joey Hess 7e95723dad avoid hitting the shell with system() 2008-11-05 14:45:45 -05:00
Joey Hess b76ee8a96d minor wording improvements/changes 2008-11-05 14:22:02 -05:00
intrigeri bd2dd8c603 po plugin: more detailed backlinks todo item
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-05 12:50:42 +01:00
intrigeri 225e21f6c5 po plugin: redesign refresh mechanism after master page update
manually triggering IkiWiki::refresh() was at least dubious, and more or less
buggy (it randomly broke the whole backlinks feature); thinking a bit more to
add the necessary bits to @needsbuild seems like a better way. don't play with
ikiwiki's internals if not absolutely needed.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-04 23:32:32 +01:00
intrigeri bc5b875de8 po plugin: remove broken parentlinks for home page's translations
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-04 20:05:21 +01:00
intrigeri 61c4129aaa po plugin: updated doc/todo
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-04 19:24:37 +01:00
intrigeri 78155454a4 po plugin: updated doc+todo
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-03 01:21:06 +01:00
intrigeri c7fbcf6c5e po plugin: slave pages link to the master's discussion page
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-03 00:52:27 +01:00
intrigeri c0d1f2cace po plugin: updated todo / doc
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 23:10:59 +01:00
intrigeri c696239b6b po plugin: added TODO about charset/encoding in new translations
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:07:01 +01:00
intrigeri 654adc105e po plugin: todo++
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-20 14:30:22 +02:00
intrigeri 8211910566 po plugin: set every configuration item to unsafe
We will check later which ones are actually safe enough for websetup.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-19 17:19:42 +02:00
intrigeri b4316fd941 po plugin: doc fix
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-19 00:15:44 +02:00
intrigeri f096a9d798 po plugin: added ISTRANSLATION and ISTRANSLATABLE template variables
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-19 00:05:13 +02:00
intrigeri 72dc1a5f02 po plugin: todo++
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-19 00:04:35 +02:00
intrigeri a0deb3038c po plugin: do not allow msgmerge to create backup files
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 19:18:22 +02:00
intrigeri d0c4d5061d po plugin: todo++
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:13 +02:00
intrigeri 7b7865150f po plugin: add correct dependencies on pages using OTHERLANGUAGES
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:13 +02:00
intrigeri 93b316f7c1 po plugin: todo++
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:13 +02:00
intrigeri 1d76762517 po plugin: initial implementation of automatic POT/PO update
The updated or created PO files are put under version control.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri c852203be8 po plugin: todo++ more security checks needed
... when creating new files.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri 58c77a01f7 po plugin: create missing POT/PO files in needsbuild hook
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri f42cf38076 po plugin: documentation work
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri 6add615928 po plugin: added and documented PERCENTTRANSLATED template variable
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri 1a670d3aca po plugin: make translation percentage available in OTHERLANGUAGES loop
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri d8c2800674 po plugin: documented custom PageSpec tests, reorganized doc a bit
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri 6f858cd59f po plugin: todo update wrt. newly translatable pages
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:11 +02:00
intrigeri d07c6b707d po plugin: todo++ : security note about system()
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:11 +02:00
intrigeri 27bfe18f51 po plugin: updated todo wrt. automatic POT/PO update/creation
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:11 +02:00