Commit Graph

1510 Commits (7691899da03a972ab89d6294478df281a3aa6e0f)

Author SHA1 Message Date
intrigeri f652af11fd Merge commit 'upstream/master' into pub/po 2008-11-07 22:19:34 +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 3e341e64c2 po: added pofiles() function, will use this soon
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 21:23:23 +01:00
intrigeri 4879a7f033 po: add comments
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 16:33:10 +01:00
Joey Hess 11d377af81 txt: Do not encode quotes when filtering the txt, as that broke later parsing of any directives on the page. 2008-11-06 20:49:18 -05:00
Joey Hess db5ea4d4f0 meta: Plugin is now enabled by default since the basewiki uses it. 2008-11-06 16:08:11 -05:00
Joey Hess ecf2399f4f aggregate: Try to query XML::Feed for the base url when derelevatising links. Since this needs the just released XML::Feed 0.3, as well as a not yet released XML::RSS, it will fall back to the old method if no xml:base info is available. 2008-11-06 16:05:10 -05: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 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 10af328ff1 po: syntax warning fix
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 14:08:33 +01:00
intrigeri 7ad5c5cbdc po: fixed whitespace
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:55:03 +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 17bd930bc9 first pass over code
Only change of note is quoting some strings in a regexp, just in case
(also avoids the . matching any character!)

Mostly whitespace changes of no consequence.
2008-11-05 15:18:07 -05:00
Joey Hess ae37bca0e2 backup refs to injected subs later
In case two plugins both inject replacements for these subs,
backup the ref just before injecting to make sure the most
recent version is seen.
2008-11-05 15:09:54 -05:00
Joey Hess 9b16e7f148 minor layout changes 2008-11-05 15:09:04 -05:00
Joey Hess 7e95723dad avoid hitting the shell with system() 2008-11-05 14:45:45 -05:00
Joey Hess 9bedf53c0f another reason to require rebuilds (and not be marked safe)
the plugin changes html filenames, so requiring a manual transition to
enable
2008-11-05 13:57:48 -05:00
Joey Hess 127a8a3701 Merge commit 'intrigeri/po' 2008-11-05 13:50:26 -05:00
Joey Hess 42b4abee1d use error for two messages 2008-11-05 01:38:36 -05:00
intrigeri 3e0c52c524 po plugin(filter): redesign temp file management
... in a way compatible with various File::Temp versions.
The result is far from being perfect (see comments in the code for details),
but it does work.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-05 01:36:44 +01:00
intrigeri 4c6c00ccdf Merge commit 'upstream/master' into prv/po 2008-11-04 23:39:15 +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 cfcb7454db po plugin: aesthetics
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-04 19:23:58 +01:00
intrigeri c731a81b43 po plugin: fix preview for PO files
As a trick, use editcontent hook to mark the page as unfiltered, to force our
filter() sub's to proceed again.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-04 18:24:43 +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 9bd3262f50 po plugin: replace %hash=undef with undef %hash
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 23:12:43 +01:00
intrigeri 773de05a7a po plugin: force utf-8 encoding in POT files
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 21:35:52 +01:00
intrigeri 2ebc0bb82d po plugin: fix linking from a translation to its master page
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 20:08:38 +01:00
intrigeri 37a9e64291 po plugin: fix targetpage for home page's translations
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:54:53 +01:00
intrigeri 439ba4490a po plugin: removed last (?) bit of deprecated custom hook
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:51:00 +01:00
intrigeri 950c29679d po plugin: replace targetpage hook with wrapper function
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:48:56 +01:00
intrigeri 439a2d3c44 Revert "added the targetpage hook"
This reverts commit fc299df955.
Such functionality can now be achieved using the inject() function.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:34:10 +01:00
intrigeri 307d11541a po plugin: replace tweakurlpath hook with a wrapper function
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:29:23 +01:00
Joey Hess d71caffb7b preprocess text before htmlizing it 2008-11-02 12:21:15 -05:00
intrigeri 7c173aca3e Revert "added hook urlpath" and "rename urlpath hook into tweakurlpath..."
This reverts commits d9b9022c13 and
39d44d443d. This functionality should now be
achieved using the new inject() function.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:08:50 +01:00
intrigeri 502a3433c4 po plugin: replace tweakbestlink hook with a wrapper function
... thanks to the new inject() feature.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 17:56:15 +01:00
intrigeri fafa98ea96 disable istranslatable memoization
It makes some test cases cry once every two tries; this may be related to the
artificial way the testsuite is run, or not. In the meantime, stop memoizing
this function.

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 16:44:42 +01:00
intrigeri 7713653878 Merge commit 'origin/master' into prv/po 2008-11-02 13:11:00 +01:00
Joey Hess bb841f94f4 format: New plugin, allows embedding differntly formatted text inside a page (ie, otl inside a mdwn page, or syntax highlighted code inside a page). 2008-10-31 16:42:20 -04:00
Joey Hess ae0a9d50be set ctime in --render mode if not known
Avoids some uninitialised value warnings.
2008-10-30 14:50:33 -04:00
Joey Hess 354d22e27b don't rely on plugin load order when determining generated directives
Instead, shortcuts will explicitly be marked as such when registered, and
listdirectives can filter them out.
2008-10-30 13:41:19 -04:00
Joey Hess 33a0e84ddb fix preview of shortcuts
Move shortcut processing back to checkconfig, and avoid it failing if the
srcdir is not defined.
2008-10-29 14:20:31 -04:00
Joey Hess 5b7677faba fix display of error msg 2008-10-29 13:38:26 -04:00