[Xfce4-commits] [www/wiki.xfce.org] 01/01: Also sync new folders
noreply at xfce.org
noreply at xfce.org
Sat Mar 3 17:41:43 CET 2018
This is an automated email from the git hooks/post-receive script.
s k u n n y k p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository www/wiki.xfce.org.
commit 93de146795ae1b7dae0cef53d73814c340c45036
Author: Romain B <skunnyk at alteroot.org>
Date: Sat Mar 3 17:41:31 2018 +0100
Also sync new folders
---
lib/plugins/captcha/lang/el/lang.php | 13 +
lib/plugins/captcha/lang/el/settings.php | 26 ++
lib/plugins/captcha/lang/sv/lang.php | 12 +
lib/plugins/captcha/lang/sv/settings.php | 24 ++
lib/plugins/loglog/lang/pt-br/intro.txt | 3 +
lib/plugins/loglog/lang/pt-br/lang.php | 17 ++
lib/plugins/orphanswanted/conf/default.php | 9 +
lib/plugins/orphanswanted/conf/metadata.php | 10 +
lib/plugins/orphanswanted/helper.php | 326 +++++++++++++++++++++
.../orphanswanted/lang/de-informal/settings.php | 10 +
lib/plugins/orphanswanted/lang/de/settings.php | 10 +
lib/plugins/orphanswanted/lang/en/settings.php | 10 +
lib/plugins/orphanswanted/manager.dat | 3 +
lib/plugins/orphanswanted/plugin.info.txt | 7 +
lib/plugins/orphanswanted/syntax.php | 120 ++++++++
lib/plugins/redirect/admin.svg | 1 +
lib/plugins/redirect/helper.php | 80 +++++
lib/plugins/redirect/lang/cs/intro.txt | 12 +
lib/plugins/redirect/lang/cs/lang.php | 10 +
lib/plugins/redirect/lang/cs/settings.php | 8 +
lib/plugins/translation/.travis.yml | 13 +
lib/plugins/translation/_test/basic.test.php | 113 +++++++
lib/plugins/translation/_test/general.test.php | 61 ++++
lib/plugins/translation/lang/sv/lang.php | 16 +
lib/plugins/translation/lang/sv/settings.php | 19 ++
lib/plugins/translation/lang/sv/totranslate.txt | 1 +
26 files changed, 934 insertions(+)
diff --git a/lib/plugins/captcha/lang/el/lang.php b/lib/plugins/captcha/lang/el/lang.php
new file mode 100644
index 0000000..48961ee
--- /dev/null
+++ b/lib/plugins/captcha/lang/el/lang.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Greek language file
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Apostolos P. Tsompanopoulos <monotropos at gmail.com>
+ */
+
+$lang['testfailed'] = "Λυπούμαστε, η απάντησή σας είναι λάθος.";
+$lang['fillcaptcha'] = "Θα πρέπει να πληκτρολογήσετε όλα τα γράμματα που βλέπετε";
+$lang['fillmath'] = "Θα πρέπει να λύσετε την αριθμητική πράξη που ακολουθεί για να εγγραφείτε.<br>";
+$lang['soundlink'] = "Αν δε μπορείτε να διαβάσετε τα γράμματα στην εικόνα, κατεβάστε αυτό το αρχείο .wav για να τα ακούσετε.";
+$lang['honeypot'] = "Αφήστε κενό αυτό το πεδίο: ";
\ No newline at end of file
diff --git a/lib/plugins/captcha/lang/el/settings.php b/lib/plugins/captcha/lang/el/settings.php
new file mode 100644
index 0000000..73f9d47
--- /dev/null
+++ b/lib/plugins/captcha/lang/el/settings.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Greek language file
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Apostolos P. Tsompanopoulos <monotropos at gmail.com>
+ */
+
+$lang['mode'] = "Ποιον τύπο CAPTCHA θα χρησιμοποιήσετε;";
+$lang['mode_o_js'] = "Κείμενο (προσυμπληρωμένο με JavaScript)";
+$lang['mode_o_text'] = "Κείμενο (με μη αυτόματο τρόπο)";
+$lang['mode_o_math'] = "Αριθμητική πράξη";
+$lang['mode_o_question'] = "Προκαθορισμένη ερώτηση";
+$lang['mode_o_image'] = "Εικόνα (κακή προσβασιμότητα)";
+$lang['mode_o_audio'] = "Εικόνα+Ήχος (καλύτερη προσβασιμότητα)";
+$lang['mode_o_svg'] = "SVG (κακή προσβασιμότητα, αναγνώσιμο)";
+$lang['mode_o_svgaudio'] = "SVG+Ήχος (καλύτερη προσβασιμότητα, αναγνώσιμο)";
+$lang['mode_o_figlet'] = "Figlet ASCII σχέδιο (κακή προσβασιμότητα)";
+
+$lang['forusers'] = "Να χρησιμοποιηθεί CAPTCHA και για τους χρήστες που είναι ενεργοί;";
+$lang['loginprotect'] = "Απαιτείται το CAPTCHA για την είσοδο των χρηστών;";
+$lang['lettercount']= "Αριθμός γραμμάτων που θα χρησιμοποιηθούν (3-16). Αν αυξήσετε το πλήθος, αυξήστε ανάλογα και το πλάτος της εικόνας παρακάτω.";
+$lang['width'] = "Πλάτος της εικόνας CAPTCHA (εικονοστοιχεία)";
+$lang['height'] = "Ύψος της εικόνας CAPTCHA (εικονοστοιχεία)";
+$lang['question'] = "Ερώτηση για τον τύπο «προκαθορισμένη ερώτηση»";
+$lang['answer'] = "Απάντηση για τον τύπο «προκαθορισμένη ερώτηση»";
\ No newline at end of file
diff --git a/lib/plugins/captcha/lang/sv/lang.php b/lib/plugins/captcha/lang/sv/lang.php
new file mode 100644
index 0000000..0bdf999
--- /dev/null
+++ b/lib/plugins/captcha/lang/sv/lang.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Tor Härnqvist <tor at harnqvist.se>
+ */
+$lang['testfailed'] = 'Tyvärr men svaret på CAPTCHA var inte korrekt. Kanske är du inte människa trots allt?';
+$lang['fillcaptcha'] = 'Var god fyll i alla bokstäver i fältet för att bevisa att du är en människa.';
+$lang['fillmath'] = 'Var god lös följande ekvation för att bevisa att du är en människa.';
+$lang['soundlink'] = 'Om du inte kan läsa bokstäverna på bilden, ladda ner denna .wav-fil för att få dem upplästa.';
+$lang['honeypot'] = 'Var god håll detta fält tomt:';
diff --git a/lib/plugins/captcha/lang/sv/settings.php b/lib/plugins/captcha/lang/sv/settings.php
new file mode 100644
index 0000000..85736f5
--- /dev/null
+++ b/lib/plugins/captcha/lang/sv/settings.php
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Tor Härnqvist <tor at harnqvist.se>
+ */
+$lang['mode'] = 'Vilken typ av CAPTCHA vill du använda?';
+$lang['mode_o_js'] = 'Text (förifylld mha JavaScript)';
+$lang['mode_o_text'] = 'Text (endast manuell)';
+$lang['mode_o_math'] = 'Matematiskt problem';
+$lang['mode_o_question'] = 'Statisk frågeställning';
+$lang['mode_o_image'] = 'Bild (sämre tillgänglighet)';
+$lang['mode_o_audio'] = 'Bild+ljud (bättre tillgänglighet)';
+$lang['mode_o_svg'] = 'SVG (sämre tillgänglighet, läsbarhet)';
+$lang['mode_o_svgaudio'] = 'SVD+ljud (bättre tillgänglighet, läsbarhet)';
+$lang['mode_o_figlet'] = 'Figlet ASCII Art (sämre tillgänglighet)';
+$lang['forusers'] = 'Använd CAPTCHA även för inloggade användare?';
+$lang['loginprotect'] = 'Kräv CAPTCHA för att logga in?';
+$lang['lettercount'] = 'Antal bokstäver (3-16). Om du ökar antalet, se då till att även öka bredden på bilden nedan.';
+$lang['width'] = 'Bredd på CAPTCHA-bilden (i pixlar)';
+$lang['height'] = 'Höjd på CAPTCHA-bilden (i pixlar)';
+$lang['question'] = 'Fråga till statisk frågeställning-inställning';
+$lang['answer'] = 'Svar till statisk frågeställning-inställning';
diff --git a/lib/plugins/loglog/lang/pt-br/intro.txt b/lib/plugins/loglog/lang/pt-br/intro.txt
new file mode 100644
index 0000000..86ab543
--- /dev/null
+++ b/lib/plugins/loglog/lang/pt-br/intro.txt
@@ -0,0 +1,3 @@
+====== Relatório Semanal de Entradas e Saídas de Usuários ======
+
+Esta tela mostra todas as entradas e saídas de usuários durante os últimos 7 dias. Você pode usar os botões de navegação no final da tela para mostrar semanas mais antigas.
\ No newline at end of file
diff --git a/lib/plugins/loglog/lang/pt-br/lang.php b/lib/plugins/loglog/lang/pt-br/lang.php
new file mode 100644
index 0000000..2c05ab4
--- /dev/null
+++ b/lib/plugins/loglog/lang/pt-br/lang.php
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Moisés Braga Ribeiro <moisesbr at gmail.com>
+ */
+$lang['menu'] = 'Relatório Semanal de Entradas e Saídas de Usuários';
+$lang['date'] = 'Data';
+$lang['ip'] = 'Endereço IP';
+$lang['action'] = 'Ação';
+$lang['range'] = 'Faixa de datas mostrada:';
+$lang['off'] = 'saiu';
+$lang['autologoff'] = 'saiu automaticamente';
+$lang['in'] = 'entrou permanentemente';
+$lang['tin'] = 'entrou temporariamente';
+$lang['fail'] = 'tentativa de entrada fracassada';
diff --git a/lib/plugins/orphanswanted/conf/default.php b/lib/plugins/orphanswanted/conf/default.php
new file mode 100644
index 0000000..3dd0895
--- /dev/null
+++ b/lib/plugins/orphanswanted/conf/default.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * Options for the Orphanswanted Plugin
+ *
+ * @author Matthias Schulte <dokuwiki at lupo49.de>
+ */
+$conf['ignoredpages'] = ''; // The plugin will doesn't list the given pages
+
+//Setup VIM: ex: et ts=2 :
diff --git a/lib/plugins/orphanswanted/conf/metadata.php b/lib/plugins/orphanswanted/conf/metadata.php
new file mode 100644
index 0000000..221fab3
--- /dev/null
+++ b/lib/plugins/orphanswanted/conf/metadata.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * Metadata for configuration manager plugin
+ * Additions for the Orphanswanted Plugin
+ *
+ * @author Matthias Schulte <dokuwiki at lupo49.de>
+ */
+$meta['ignoredpages'] = array('string');
+
+//Setup VIM: ex: et ts=2 :
diff --git a/lib/plugins/orphanswanted/helper.php b/lib/plugins/orphanswanted/helper.php
new file mode 100644
index 0000000..50e7ad3
--- /dev/null
+++ b/lib/plugins/orphanswanted/helper.php
@@ -0,0 +1,326 @@
+<?php
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author <dae at douglasedmunds.com>
+ * @author Andy Webber <dokuwiki at andywebber dot com>
+ * @author Federico Ariel Castagnini
+ * @author Cyrille37 <cyrille37 at gmail.com>
+ * @author Matthias Schulte <dokuwiki at lupo49.de>
+ * @author Rik Blok <rik dot blok at ubc dot ca>
+ * @author Christian Paul <christian at chrpaul dot de>
+ */
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
+if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
+
+require_once(DOKU_INC.'inc/search.php');
+
+class helper_plugin_orphanswanted extends DokuWiki_Plugin {
+
+ function orph_callback_search_wanted(&$data, $base, $file, $type, $lvl, $opts) {
+
+ if($type == 'd') {
+ return true; // recurse all directories, but we don't store namespaces
+ }
+
+ if(!preg_match("/.*\.txt$/", $file)) {
+ // Ignore everything but TXT
+ return true;
+ }
+
+ // search the body of the file for links
+ // dae mod
+ // orph_Check_InternalLinks(&$data,$base,$file,$type,$lvl,$opts);
+ $this->orph_Check_InternalLinks($data,$base,$file,$type,$lvl,$opts);
+
+ $eventData = array(
+ 'data' => &$data,
+ 'file' => $file
+ );
+ trigger_event('PLUGIN_ORPHANS_WANTED_PROCESS_PAGE', $eventData);
+
+ // get id of this file
+ $id = pathID($file);
+
+ //check ACL
+ if(auth_quickaclcheck($id) < AUTH_READ) {
+ return false;
+ }
+
+ // try to avoid making duplicate entries for forms and pages
+ $item = &$data["$id"];
+
+ if(isset($item)) {
+ // This item already has a member in the array
+ // Note that the file search found it
+ $item['exists'] = true;
+ } else {
+ // Create a new entry
+ $data["$id"]=array('exists' => true, 'links' => 0);
+ }
+ return true;
+ }
+
+ function orph_handle_link(&$data, $link) {
+ global $conf;
+
+ if(isset($data[$link])) {
+ // This item already has a member in the array
+ // Note that the file search found it
+ $data[$link]['links'] ++ ; // count the link
+ } else {
+ // Create a new entry
+ $data[$link] = array(
+ 'exists' => false, // Only found a link, not the file
+ 'links' => 1
+ );
+ // echo " <!-- added link to list --> \n";
+ }
+
+ if ($conf['allowdebug']) echo "<p>-- New count for link <b>" . $link . "</b>: " . $data[$link]['links'] . "</p>\n";
+ }
+
+
+ /**
+ * Search for internal wiki links in page $file
+ */
+ function orph_Check_InternalLinks( &$data, $base, $file, $type, $lvl, $opts ) {
+ global $conf;
+
+ if (!defined('LINK_PATTERN')) define('LINK_PATTERN', '%\[\[([^\]|#]*)(#[^\]|]*)?\|?([^\]]*)]]%');
+
+ if(!preg_match("/.*\.txt$/", $file)) {
+ return;
+ }
+
+ $currentID = pathID($file);
+ $currentNS = getNS($currentID);
+
+ if($conf['allowdebug']) echo sprintf("<p><b>%s</b>: %s</p>\n", $file, $currentID);
+
+ // echo " <!-- checking file: $file -->\n";
+ $body = @file_get_contents($conf['datadir'] . $file);
+
+ // ignores entries in blocks that ignore links
+ foreach( array(
+ '@<nowiki>.*?<\/nowiki>@su',
+ '@%%.*?%%@su',
+ '@<php>.*?</php>@su',
+ '@<PHP>.*?</PHP>@su',
+ '@<html>.*?</html>@su',
+ '@<HTML>.*?</HTML>@su',
+ '@^( {2,}|\t)[^\*\- ].*?$@mu',
+ '@<code[^>]*?>.*?<\/code>@su',
+ '@<file[^>]*?>.*?<\/file>@su'
+ )
+ as $ignored )
+ {
+ $body = preg_replace($ignored, '', $body);
+ }
+
+ $links = array();
+ preg_match_all( LINK_PATTERN, $body, $links );
+
+ foreach($links[1] as $link) {
+ if($conf['allowdebug']) echo sprintf("--- Checking %s<br />\n", $link);
+
+ if( (0 < strlen(ltrim($link)))
+ and ! preg_match('/^[a-zA-Z0-9\.]+>{1}.*$/u',$link) // Interwiki
+ and ! preg_match('/^\\\\\\\\[\w.:?\-;,]+?\\\\/u',$link) // Windows Share
+ and ! preg_match('#^([a-z0-9\-\.+]+?)://#i',$link) // external link (accepts all protocols)
+ and ! preg_match('<'.PREG_PATTERN_VALID_EMAIL.'>',$link) // E-Mail (pattern above is defined in inc/mail.php)
+ and ! preg_match('!^#.+!',$link) // inside page link (html anchor)
+ ) {
+ # remove parameters
+ $link = preg_replace('/\?.*/', '', $link);
+
+ $pageExists = false;
+ resolve_pageid($currentNS, $link, $pageExists );
+ if ($conf['allowdebug']) echo sprintf("---- link='%s' %s ", $link, $pageExists?'EXISTS':'MISS');
+
+ if(((strlen(ltrim($link)) > 0) // there IS an id?
+ and !auth_quickaclcheck($link) < AUTH_READ)) {
+ // should be visible to user
+ //echo " <!-- adding $link -->\n";
+
+ if($conf['allowdebug']) echo ' A_LINK' ;
+
+ $link= utf8_strtolower( $link );
+ $this->orph_handle_link($data, $link);
+ }
+ else
+ {
+ if($conf['allowdebug']) echo ' EMPTY_OR_FORBIDDEN' ;
+ }
+ } // link is not empty and is a local link?
+ else {
+ if($conf['allowdebug']) echo ' NOT_INTERNAL';
+ }
+
+ if($conf['allowdebug']) echo "<br />\n";
+ } // end of foreach link
+ }
+
+ // three choices
+ // $params_array used to extract excluded namespaces for report
+ // orphans = orph_report_table($data, true, false, $params_array);
+ // wanted = orph_report_table($data, false, true), $params_array;
+ // valid = orph_report_table($data, true, true, $params_array);
+
+ function orphan_pages($params_array) {
+ global $conf, $ID;
+ $result = '';
+ $data = array();
+ search($data,$conf['datadir'], array($this, 'orph_callback_search_wanted'), array('ns' => getNS($ID)));
+ $result .= $this->orph_report_table($data, true, false, $params_array, 'orphan');
+
+ return $result;
+ }
+
+ function wanted_pages($params_array) {
+ global $conf, $ID;
+ $result = '';
+ $data = array();
+ search($data,$conf['datadir'], array($this, 'orph_callback_search_wanted'), array('ns' => getNS($ID)));
+ $result .= $this->orph_report_table($data, false, true, $params_array, 'wanted');
+
+ return $result;
+ }
+
+ function valid_pages($params_array) {
+ global $conf, $ID;
+ $result = '';
+ $data = array();
+ search($data,$conf['datadir'], array($this, 'orph_callback_search_wanted'), array('ns' => getNS($ID)));
+ $result .= $this->orph_report_table($data, true, true, $params_array, 'valid');
+
+ return $result;
+ }
+
+ function all_pages($params_array) {
+ global $conf, $ID;
+ $result = '';
+ $data = array();
+ search($data,$conf['datadir'], array($this, 'orph_callback_search_wanted') , array('ns' => getNS($ID)));
+
+ $result .= "</p><p>Orphans</p><p>";
+ $result .= $this->orph_report_table($data, true, false, $params_array, 'orphan');
+ $result .= "</p><p>Wanted</p><p>";
+ $result .= $this->orph_report_table($data, false, true, $params_array, 'wanted');
+ $result .= "</p><p>Valid</p><p>";
+ $result .= $this->orph_report_table($data, true, true, $params_array, 'valid');
+
+ return $result;
+ }
+
+ function orph_report_table($data, $page_exists, $has_links, $params_array, $caller = null) {
+ global $conf;
+ $ignoredPages = $this->getConf('ignoredpages'); // Fetch pages which shouldn't be listed
+ if($ignoredPages != '') {
+ $ignoredPages = explode(';', $ignoredPages);
+ } else {
+ $ignoredPages = null;
+ }
+
+ $show_heading = ($page_exists && $conf['useheading']) ? true : false ;
+ //take off $params_array[0];
+ $include_array = $params_array[1];
+ $exclude_array = $params_array[2];
+
+ $count = 1;
+ $output = '';
+
+ // for valid html - need to close the <p> that is feed before this
+ $output .= '</p>';
+ $output .= '<table class="inline"><tr><th> # </th><th> ID </th>'
+ . ($show_heading ? '<th>Title</th>' : '' )
+ . ($caller != "orphan" ? '<th>Links</th>' : '')
+ . '</tr>'
+ . "\n" ;
+
+ // Sort by namespace and name
+ ksort($data);
+
+ // Sort descending by existing links.
+ // This does not make sense for orphans since they don't have links.
+ if ($caller != "orphan") {
+ arsort($data);
+ }
+
+ foreach($data as $id=>$item) {
+ if( ! (($item['exists'] == $page_exists) and (($item['links'] <> 0)== $has_links)) ) continue ;
+
+ // $id is a string, looks like this: page, namespace:page, or namespace:<subspaces>:page
+ $match_array = explode(":", $id);
+ //remove last item in array, the page identifier
+ $match_array = array_slice($match_array, 0, -1);
+ //put it back together
+ $page_namespace = implode (":", $match_array);
+ //add a trailing :
+ $page_namespace = $page_namespace . ':';
+
+ if (empty($include_array)) {
+ // if inclusion list is empty then show all namespaces
+ $show_it = true;
+ } else {
+ // otherwise only show if in inclusion list
+ $show_it = false;
+ foreach ($include_array as $include_item) {
+ //add a trailing : to each $item too
+ $include_item = $include_item . ":";
+ // need === to avoid boolean false
+ // strpos(haystack, needle)
+ // if exclusion is beginning of page's namespace, block it
+ if (strpos($page_namespace, $include_item) === 0) {
+ //there is a match, so show it and move on
+ $show_it = true;
+ break;
+ }
+ }
+ }
+
+ if(!is_null($ignoredPages) && in_array($id, $ignoredPages)) {
+ if ($conf['allowdebug']) echo "Skipped page (global ignored): " . $id . "<br />";
+ $show_it = false;
+ } elseif(isHiddenPage($id)) {
+ if ($conf['allowdebug']) echo "Skipped page (global hidden): " . $id . "<br />";
+ $show_it = false;
+ } elseif ( $show_it ) {
+ //check if blocked by exclusion list
+ foreach ($exclude_array as $exclude_item) {
+ //add a trailing : to each $item too
+ $exclude_item = $exclude_item . ":";
+ // need === to avoid boolean false
+ // strpos(haystack, needle)
+ // if exclusion is beginning of page's namespace , block it
+ if (strpos($page_namespace, $exclude_item) === 0) {
+ //there is a match, so block it and move on
+ $show_it = false;
+ break;
+ }
+ }
+ }
+
+ if($show_it) {
+ $output .= "<tr><td>$count</td><td><a href=\"". wl($id)
+ . "\" class=\"" . ($page_exists ? "wikilink1" : "wikilink2") . "\" >"
+ . $id .'</a></td>'
+ . ($show_heading ? '<td>' . hsc(p_get_first_heading($id)) .'</td>' : '' );
+
+ if($caller != "orphan") { // Skip "link" column if user wants orphan pages only
+ $output .= '<td>' . $item['links']
+ . ($has_links ? " : <a href=\"". wl($id, 'do=backlink')
+ . "\" class=\"wikilink1\">Show backlinks</a>" : '') . "</td>";
+ }
+ $output .= "</tr>\n";
+ $count++;
+ }
+ }
+
+ $output .= "</table>\n";
+ //for valid html = need to reopen a <p>
+ $output .= '<p>';
+
+ return $output;
+ }
+}
diff --git a/lib/plugins/orphanswanted/lang/de-informal/settings.php b/lib/plugins/orphanswanted/lang/de-informal/settings.php
new file mode 100644
index 0000000..fb712a8
--- /dev/null
+++ b/lib/plugins/orphanswanted/lang/de-informal/settings.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * english language file
+ *
+ * @author Matthias Schulte <dokuwiki at lupo49.de>
+ */
+
+$lang['ignoredpages'] = 'Diese Seiten nie in den Ausgaben anzeigen (Trennzeichen: Semikolon)';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/lib/plugins/orphanswanted/lang/de/settings.php b/lib/plugins/orphanswanted/lang/de/settings.php
new file mode 100644
index 0000000..fb712a8
--- /dev/null
+++ b/lib/plugins/orphanswanted/lang/de/settings.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * english language file
+ *
+ * @author Matthias Schulte <dokuwiki at lupo49.de>
+ */
+
+$lang['ignoredpages'] = 'Diese Seiten nie in den Ausgaben anzeigen (Trennzeichen: Semikolon)';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/lib/plugins/orphanswanted/lang/en/settings.php b/lib/plugins/orphanswanted/lang/en/settings.php
new file mode 100644
index 0000000..8796acb
--- /dev/null
+++ b/lib/plugins/orphanswanted/lang/en/settings.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * english language file
+ *
+ * @author Matthias Schulte <dokuwiki at lupo49.de>
+ */
+
+$lang['ignoredpages'] = 'Always skip these pages in the output table (Delimiter: Semicolon)';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/lib/plugins/orphanswanted/manager.dat b/lib/plugins/orphanswanted/manager.dat
new file mode 100644
index 0000000..2007f34
--- /dev/null
+++ b/lib/plugins/orphanswanted/manager.dat
@@ -0,0 +1,3 @@
+downloadurl=https://github.com/lupo49/dokuwiki-plugin-orphanswanted/zipball/master
+installed=Mon, 01 May 2017 11:21:16 +0200
+updated=Sat, 30 Sep 2017 21:46:06 +0200
diff --git a/lib/plugins/orphanswanted/plugin.info.txt b/lib/plugins/orphanswanted/plugin.info.txt
new file mode 100644
index 0000000..e646843
--- /dev/null
+++ b/lib/plugins/orphanswanted/plugin.info.txt
@@ -0,0 +1,7 @@
+base orphanswanted
+author Doug Edmunds, Cyrille37, Federico Ariel Castagnini, Andy Webber, Matthias Schulte
+email dokuwiki at lupo49.de
+date 2017-06-25
+name orphanswanted plugin
+desc Display Orphans, Wanteds and Valid link tables
+url http://dokuwiki.org/plugin:orphanswanted
diff --git a/lib/plugins/orphanswanted/syntax.php b/lib/plugins/orphanswanted/syntax.php
new file mode 100644
index 0000000..2668111
--- /dev/null
+++ b/lib/plugins/orphanswanted/syntax.php
@@ -0,0 +1,120 @@
+<?php
+/**
+ * OrphansWanted Plugin: Display Orphans, Wanteds and Valid link information
+ *
+ * syntax ~~ORPHANSWANTED:<choice>[@<include list>][!<exclude list>]~~ <choice> :: orphans | wanted | valid | all
+ * [@<include list>] :: optional. prefix each with @ e.g., @wiki at comments:currentyear (defaults to all namespaces if not specified)
+ * [!<exclude list>] :: optional. prefix each with ! e.g., !wiki!comments:currentyear
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author <dae at douglasedmunds.com>
+ * @author Andy Webber <dokuwiki at andywebber dot com>
+ * @author Federico Ariel Castagnini
+ * @author Cyrille37 <cyrille37 at gmail.com>
+ * @author Rik Blok <rik dot blok at ubc dot ca>
+ * @author Christian Paul <christian at chrpaul dot de>
+ */
+
+if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
+if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
+require_once(DOKU_PLUGIN.'syntax.php');
+
+/**
+ * All DokuWiki plugins to extend the parser/rendering mechanism
+ * need to inherit from this class
+ */
+class syntax_plugin_orphanswanted extends DokuWiki_Syntax_Plugin {
+
+ /**
+ * What kind of syntax are we?
+ */
+ function getType(){
+ return 'substition';
+ }
+
+ /**
+ * What about paragraphs?
+ */
+ function getPType(){
+ return 'normal';
+ }
+
+ /**
+ * Where to sort in?
+ */
+ function getSort(){
+ return 990; // was 990
+ }
+
+
+ /**
+ * Connect pattern to lexer
+ */
+ function connectTo($mode) {
+ $this->Lexer->addSpecialPattern('~~ORPHANSWANTED:[\w:@!-]+~~', $mode, 'plugin_orphanswanted');
+ }
+
+ /**
+ * Handle the match
+ */
+ function handle($match, $state, $pos, Doku_Handler $handler){
+ $match_array = array();
+ $match = substr($match,16,-2); //strip ~~ORPHANSWANTED: from start and ~~ from end
+
+ // Wolfgang 2007-08-29 suggests commenting out the next line
+ // $match = strtolower($match);
+ //create array, using ! as separator
+ // eg: $match = 'all at includens!excludens'
+ $match_in = explode("@", $match); // eg: $match_array = array(); $match_in = array('all', 'includens!excludens')
+ $match_ex = explode("!",array_pop($match_in)); // eg: $match_array = array(); $match_in = array('all'); $match_ex = array('includens', 'excludens')
+ array_push($match_in,array_shift($match_ex)); // eg: $match_array = array(); $match_in = array('all', 'includens'); $match_ex = array('excludens')
+ $match_array[0] = array_shift($match_in); // eg: $match_array = array('all'); $match_in = array('includens'); $match_ex = array('excludens')
+ $match_array[1] = $match_in; // eg: $match_array = array('all', array('includens')); $match_ex = array('excludens')
+ $match_array[2] = $match_ex; // eg: $match_array = array('all', array('includens'), array('excludens'))
+
+ // $match_array[0] will be orphan, wanted, valid, all, or syntax error
+ // if there are excluded namespaces, they will be in $match_array[1] .. [x]
+ // this return value appears in render() as the $data param there
+
+ return $match_array;
+ }
+
+ /**
+ * Create output
+ */
+ function render($format, Doku_Renderer $renderer, $data) {
+ global $INFO, $conf;
+ $helper = plugin_load('helper','orphanswanted');
+
+ if($format == 'xhtml') {
+ // prevent caching to ensure content is always fresh
+ $renderer->info['cache'] = false;
+
+ // $data is an array
+ // $data[1]..[x] are excluded namespaces, $data[0] is the report type
+ //handle choices
+
+ switch ($data[0]) {
+ case 'orphans':
+ $renderer->doc .= $helper->orphan_pages($data);
+ break;
+ case 'wanted':
+ $renderer->doc .= $helper->wanted_pages($data);
+ break;
+ case 'valid':
+ $renderer->doc .= $helper->valid_pages($data);
+ break;
+ case 'all':
+ $renderer->doc .= $helper->all_pages($data);
+ break;
+ default:
+ $renderer->doc .= "ORPHANSWANTED syntax error";
+ }
+ return true;
+ }
+
+ return false;
+ }
+}
+
+//Setup VIM: ex: et ts=4 enc=utf-8 :
diff --git a/lib/plugins/redirect/admin.svg b/lib/plugins/redirect/admin.svg
new file mode 100644
index 0000000..ce0ebbe
--- /dev/null
+++ b/lib/plugins/redirect/admin.svg
@@ -0,0 +1 @@
+<svg style="width:24px;height:24px" viewBox="0 0 24 24"><path d="M3 4v8.5l3-3L9 13c1 1 1 2 1 2v6h4v-7s0-1-.53-2S12 10 12 10L9 6.58 11.5 4M18 4l-4.46 4.47L14 9s.93 1 1.47 2c.21.4.33.79.4 1.13L21 7"/></svg>
\ No newline at end of file
diff --git a/lib/plugins/redirect/helper.php b/lib/plugins/redirect/helper.php
new file mode 100644
index 0000000..86408bd
--- /dev/null
+++ b/lib/plugins/redirect/helper.php
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Redirect plugin
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Andreas Gohr <andi at splitbrain.org>
+ */
+
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
+
+/**
+ * Class helper_plugin_redirect
+ *
+ * Save and load the config file
+ */
+class helper_plugin_redirect extends DokuWiki_Admin_Plugin {
+
+ const CONFIG_FILE = DOKU_CONF . '/redirect.conf';
+ const LEGACY_FILE = __DIR__ . '/redirect.conf';
+
+ /**
+ * helper_plugin_redirect constructor.
+ *
+ * handles the legacy file
+ */
+ public function __construct() {
+ // move config from plugin directory to conf directory
+ if(!file_exists(self::CONFIG_FILE) &&
+ file_exists(self::LEGACY_FILE)) {
+ rename(self::LEGACY_FILE, self::CONFIG_FILE);
+ }
+ }
+
+ /**
+ * Saves the config file
+ *
+ * @param string $config the raw text for the config
+ * @return bool
+ */
+ public function saveConfigFile($config) {
+ return io_saveFile(self::CONFIG_FILE, cleanText($config));
+ }
+
+ /**
+ * Load the config file
+ *
+ * @return string the raw text of the config
+ */
+ public function loadConfigFile() {
+ if(!file_exists(self::CONFIG_FILE)) return '';
+ return io_readFile(self::CONFIG_FILE);
+ }
+
+ /**
+ * Get the redirect URL for a given ID
+ *
+ * Handles conf['showmsg']
+ *
+ * @param string $id the ID for which the redirect is wanted
+ * @return bool|string the full URL to redirect to
+ */
+ public function getRedirectURL($id) {
+ $redirects = confToHash(self::CONFIG_FILE);
+ if(empty($redirects[$id])) return false;
+
+ if(preg_match('/^https?:\/\//', $redirects[$id])) {
+ $url = $redirects[$id];
+ } else {
+ if($this->getConf('showmsg')) {
+ msg(sprintf($this->getLang('redirected'), hsc($id)));
+ }
+ $link = explode('#', $redirects[$id], 2);
+ $url = wl($link[0], '', true, '&');
+ if(isset($link[1])) $url .= '#' . rawurlencode($link[1]);
+ }
+
+ return $url;
+ }
+}
diff --git a/lib/plugins/redirect/lang/cs/intro.txt b/lib/plugins/redirect/lang/cs/intro.txt
new file mode 100644
index 0000000..ea3bc2b
--- /dev/null
+++ b/lib/plugins/redirect/lang/cs/intro.txt
@@ -0,0 +1,12 @@
+====== Nastavení přesměrování ======
+
+Na této stránce můžete nastavit přesměrování pro vaši wiki. Můžete přesměrovat na externí webové stránky nebo stránky ve wiki. Všechny názvy stránek musí být absolutní a očištěné (žádné speciální znaky, vše minuskulemi, plné jmenné prostory((namespace))).
+Před kotevním křížkem musí být \.
+
+Používejte tento formát:
+
+<code>
+stranka1 vnitrnistranka
+stranka2 http://priklad.cz
+stranka3 vnitrnistranka\#nadpis
+</code>
\ No newline at end of file
diff --git a/lib/plugins/redirect/lang/cs/lang.php b/lib/plugins/redirect/lang/cs/lang.php
new file mode 100644
index 0000000..27718a5
--- /dev/null
+++ b/lib/plugins/redirect/lang/cs/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Pavel Krupička <pajdacz at gmail.com>
+ */
+$lang['name'] = 'Nastavení přesměrování stránek';
+$lang['saved'] = 'Data uložena.';
+$lang['redirected'] = 'Byl jste přesměrován z <b>%s</b>.';
diff --git a/lib/plugins/redirect/lang/cs/settings.php b/lib/plugins/redirect/lang/cs/settings.php
new file mode 100644
index 0000000..e5509a5
--- /dev/null
+++ b/lib/plugins/redirect/lang/cs/settings.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Pavel Krupička <pajdacz at gmail.com>
+ */
+$lang['showmsg'] = 'Zobrazit uživatelům zprávu o přesměrování?';
diff --git a/lib/plugins/translation/.travis.yml b/lib/plugins/translation/.travis.yml
new file mode 100644
index 0000000..c7eb5a6
--- /dev/null
+++ b/lib/plugins/translation/.travis.yml
@@ -0,0 +1,13 @@
+# Config file for travis-ci.org
+
+language: php
+php:
+ - "7.1"
+ - "7.0"
+ - "5.6"
+env:
+ - DOKUWIKI=master
+ - DOKUWIKI=stable
+before_install: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh
+install: sh travis.sh
+script: cd _test && phpunit --stderr --group plugin_translation
diff --git a/lib/plugins/translation/_test/basic.test.php b/lib/plugins/translation/_test/basic.test.php
new file mode 100644
index 0000000..870c7a7
--- /dev/null
+++ b/lib/plugins/translation/_test/basic.test.php
@@ -0,0 +1,113 @@
+<?php
+
+/**
+ * General tests for the translation plugin
+ *
+ * @group plugin_translation
+ * @group plugins
+ */
+class basic_plugin_translation_test extends DokuWikiTest {
+
+ protected $pluginsEnabled = array('translation');
+
+ public static function buildTransID_testdata() {
+ return array(
+ array(
+ 'en',
+ 'ns:page',
+ 'de es',
+ array(':ns:page', 'en'),
+ ),
+ array(
+ '',
+ 'ns:page',
+ 'de es',
+ array(':ns:page', 'en'),
+ ),
+ array(
+ 'de',
+ 'ns:page',
+ 'de es',
+ array(':de:ns:page', 'de'),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider buildTransID_testdata
+ *
+ * @param $inputLang
+ * @param $inputID
+ * @param $translationsOption
+ * @param $expected
+ */
+ public function test_buildTransID($inputLang, $inputID, $translationsOption, $expected) {
+ global $conf;
+ $conf['plugin']['translation']['translations'] = $translationsOption;
+ /** @var helper_plugin_translation $helper */
+ $helper = plugin_load('helper', 'translation', true);
+
+ $actual_result = $helper->buildTransID($inputLang, $inputID);
+
+ $this->assertEquals($expected, $actual_result);
+ }
+
+
+ public static function redirectStart_testdata() {
+ return array(
+ array(
+ 'start',
+ 'de es',
+ 'de,en-US;q=0.8,en;q=0.5,fr;q=0.3',
+ ':de:start',
+ 'redirect to translated page',
+ ),
+ array(
+ 'start',
+ 'de es',
+ 'en-US,de;q=0.8,en;q=0.5,fr;q=0.3',
+ array(),
+ 'do not redirect if basic namespace is correct lang',
+ ),
+ array(
+ 'de:start',
+ 'en de es',
+ 'en-US,en;q=0.8,fr;q=0.5',
+ array(),
+ 'do not redirect anything other than exactly $conf[\'start\']',
+ ),
+ );
+ }
+
+
+ /**
+ * @dataProvider redirectStart_testdata
+ *
+ * @param $input
+ * @param $translationsOption
+ * @param $httpAcceptHeader
+ * @param $expected
+ */
+ public function test_redirectStart($input, $translationsOption, $httpAcceptHeader, $expected, $msg) {
+ global $conf;
+ $conf['plugin']['translation']['translations'] = $translationsOption;
+ $conf['plugin']['translation']['redirectstart'] = 1;
+
+ /** @var helper_plugin_translation $helper */
+ $helper = plugin_load('helper', 'translation');
+ $helper->loadTranslationNamespaces();
+
+ $request = new TestRequest();
+ $request->setServer('HTTP_ACCEPT_LANGUAGE', $httpAcceptHeader);
+
+ $response = $request->get(array('id' => $input));
+ $actual = $response->getHeader('Location');
+
+ if (is_string($actual)) {
+ list(, $actual) = explode('doku.php?id=', $actual);
+ }
+
+ $this->assertEquals($expected, $actual, $msg);
+ }
+
+}
diff --git a/lib/plugins/translation/_test/general.test.php b/lib/plugins/translation/_test/general.test.php
new file mode 100644
index 0000000..ec1675c
--- /dev/null
+++ b/lib/plugins/translation/_test/general.test.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * General tests for the translation plugin
+ *
+ * @group plugin_translation
+ * @group plugins
+ */
+class general_plugin_translation_test extends DokuWikiTest {
+
+ /**
+ * Simple test to make sure the plugin.info.txt is in correct format
+ */
+ public function test_plugininfo() {
+ $file = __DIR__.'/../plugin.info.txt';
+ $this->assertFileExists($file);
+
+ $info = confToHash($file);
+
+ $this->assertArrayHasKey('base', $info);
+ $this->assertArrayHasKey('author', $info);
+ $this->assertArrayHasKey('email', $info);
+ $this->assertArrayHasKey('date', $info);
+ $this->assertArrayHasKey('name', $info);
+ $this->assertArrayHasKey('desc', $info);
+ $this->assertArrayHasKey('url', $info);
+
+ $this->assertEquals('translation', $info['base']);
+ $this->assertRegExp('/^https?:\/\//', $info['url']);
+ $this->assertTrue(mail_isvalid($info['email']));
+ $this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']);
+ $this->assertTrue(false !== strtotime($info['date']));
+ }
+
+ /**
+ * Test to ensure that every conf['...'] entry in conf/default.php has a corresponding meta['...'] entry in
+ * conf/metadata.php.
+ */
+ public function test_plugin_conf() {
+ $conf_file = __DIR__.'/../conf/default.php';
+ if (file_exists($conf_file)){
+ include($conf_file);
+ }
+ $meta_file = __DIR__.'/../conf/metadata.php';
+ if (file_exists($meta_file)) {
+ include($meta_file);
+ }
+
+ $this->assertEquals(gettype($conf), gettype($meta),'Both ' . DOKU_PLUGIN . 'translation/conf/default.php and ' . DOKU_PLUGIN . 'translation/conf/metadata.php have to exist and contain the same keys.');
+
+ if (gettype($conf) != 'NULL' && gettype($meta) != 'NULL') {
+ foreach($conf as $key => $value) {
+ $this->assertArrayHasKey($key, $meta, 'Key $meta[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'translation/conf/metadata.php');
+ }
+
+ foreach($meta as $key => $value) {
+ $this->assertArrayHasKey($key, $conf, 'Key $conf[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'translation/conf/default.php');
+ }
+ }
+
+ }
+}
diff --git a/lib/plugins/translation/lang/sv/lang.php b/lib/plugins/translation/lang/sv/lang.php
new file mode 100644
index 0000000..6f40f58
--- /dev/null
+++ b/lib/plugins/translation/lang/sv/lang.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Tor Härnqvist <tor at harnqvist.se>
+ */
+$lang['translations'] = 'Översättningar av denna sida';
+$lang['outdated'] = 'Denna översättning är äldre än <a href="%s" class="wikilink1">orginalsidan</a> och kan vara daterad.';
+$lang['diff'] = 'Se vad som har <a href="%s" class="wikilink1">ändrats</a>.';
+$lang['transloaded'] = 'Innehållet på denna sidas översättning på %s har blivit förinläst för enklare översättning.<br />Du kan dock basera din översättning på följande redan existerande översättningar: %s.';
+$lang['menu'] = 'daterade och saknade översättningar';
+$lang['missing'] = 'Saknas!';
+$lang['old'] = 'daterad';
+$lang['current'] = 'uppdaterad';
+$lang['path'] = 'Sökväg';
diff --git a/lib/plugins/translation/lang/sv/settings.php b/lib/plugins/translation/lang/sv/settings.php
new file mode 100644
index 0000000..4cd67f4
--- /dev/null
+++ b/lib/plugins/translation/lang/sv/settings.php
@@ -0,0 +1,19 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Tor Härnqvist <tor at harnqvist.se>
+ */
+$lang['translations'] = 'Blankstegsseparerad lista över översatta språk (ISO-koder).';
+$lang['translationns'] = 'Om du bara önskar översättningar under en specifik namnrymd, placera den här.';
+$lang['skiptrans'] = 'När sidnamnet matchar detta reguljära uttryck, visa ej översättningsmenyn.';
+$lang['dropdown'] = 'Använd en rullista för att visa översättningarna (rekommenderat till fem eller fler språk).';
+$lang['translateui'] = 'Skall språket för användargränssnittet växlas även för namnrymder på främmande språk?';
+$lang['redirectstart'] = 'Skall startsidan automatiskt omdirigeras till en språkspecifik namnrymd baserat på webbläsarens språkdetektion?';
+$lang['about'] = 'Fyll i ett sidnamn här där översättningsfunktionen förklaras för dina användare. Sidan kommer att länkas från språkväljaren.';
+$lang['localabout'] = 'Använd översatt version av "Om"-sidan (istället för en global "Om"-sida).';
+$lang['checkage'] = 'Varna för möjligt daterade översättningar.';
+$lang['display'] = 'Ange vad du önskar visas i menyn för språkval. Vänligen notera att nationsfanor för språkval ej är rekommenderat.';
+$lang['copytrans'] = 'Kopiera texten på originalspråket till textredigeraren när en ny översättning inleds?';
+$lang['show_path'] = 'Visa sökväg på sidan för den saknade översättningen?';
diff --git a/lib/plugins/translation/lang/sv/totranslate.txt b/lib/plugins/translation/lang/sv/totranslate.txt
new file mode 100644
index 0000000..d4f7a53
--- /dev/null
+++ b/lib/plugins/translation/lang/sv/totranslate.txt
@@ -0,0 +1 @@
+FIXME **Denna sida är inte helt översatt än. Var god hjälp till att avsluta översättningen.**\\ //(ta bort detta stycke när översättningen är färdig)//
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list