Commit Graph

2094 Commits

Author SHA1 Message Date
Alex Schroeder
fd18de2b9e Fix issues discovered by meta.t 2016-06-23 00:34:56 +02:00
Alex Schroeder
2588e5e835 toc.pl: use ToString and don't double-decode
ToString now takes more arguments.
2016-06-22 16:24:07 +02:00
Alex Schroeder
678baec68b Moving modules from utf8::encode to encode_utf8 2016-06-22 15:37:04 +02:00
Alex Schroeder
47de199dd5 Moving from utf8::encode to encode_utf8 2016-06-22 14:43:28 +02:00
Alex Schroeder
7ca2d5eb3b Changing $foo/$bar to "$foo/$bar"
Why did this not cause a syntax error?
2016-06-19 15:56:34 +02:00
Alex Schroeder
cd14410ed2 latex.pl: Globbing nil requires double quotes to work 2016-06-19 15:55:46 +02:00
Alex Schroeder
e7b7aec76f opendir also requires bytes 2016-06-19 15:55:03 +02:00
Alex Schroeder
94b8a1c4d8 All open and tie calls need utf8::encode 2016-06-19 13:51:11 +02:00
Alex Schroeder
d30f701266 bsd_glob replaced with Glob 2016-06-19 11:55:58 +02:00
Alex Schroeder
116f1d1fcb tags.pl: Storable also needs bytes in filename 2016-06-19 00:10:39 +02:00
Alex Schroeder
46cb69a6c3 Use helper functions for accessing the file system
As we derive a lot of filenames from strings in UTF-8 encoded files, we
need to make sure that any filename that might might be set by a user –
including all the filenames containing a directory deriving from
$DataDir – are passed through utf8::encode. That is, every character
gets replaced with a sequence of one or more characters that represent
the individual bytes of the character and the UTF8 flag is turned off.

In other words, -d $DataDir might not work if $DataDir contains a UTF-8
encoded string. The solution is to use the following replacements:

-f $name            IsFile($name)
-e $name            IsFile($name)
-d $name            IsDir($name)
(stat($name))[9]    Modified($name)
-M $name            $Now - Modified($name)
-z $name            ZeroSize($name)
unlink $name        Unlink($name)
mkdir $name         CreateDir($name)
rmdir $name         RemoveDir($name)

(Using IsFile for -e is probably not ideal?)

If you don’t, and Oddmuse gets used with Mojolicious, and you use the
Namespaces Extension, and a namespace contains non-ASCII characters such
as ä, ö, or ü, these characters will end up as part of $DataDir and
trigger the problem.

I also wonder whether we should be using some other Perl library.
2016-06-17 14:49:34 +02:00
Alex Schroeder
5a5e293e2d Simplify namespaces.pl initialization 2016-06-12 21:24:43 +02:00
Alex Schroeder
2009e65944 Fix typo: substring → substr 2016-06-05 18:00:01 +02:00
Alex Schroeder
7a0f48ccaf Add Spanish national days 2016-05-28 13:58:57 +02:00
Alex Schroeder
e2ae0b38d6 load-lang.pl: Fix code and add test
If you're accept-language settings included something for which no file
exists (such as "de-ch"), then the test for the file would
succeed (testing for the existence of "$LoadLanguageDir/") even though
no actual file will be loaded. This is fixed. Also: implemented actual
testing.
2016-05-28 09:30:59 +02:00
Alex Schroeder
10346e8f55 static-copy.pl: Fix non-ascii links
It seems like it is operating on url-encoded strings, so all we have to
do is to decode it. This, however, does not mean that we should print
decoded strings. ‘href’ attribute still has to be encoded (or so it seems).
2016-02-02 20:22:06 +02:00
Alex Schroeder
d5053f8f3e load-lang.pl: Add Estonian translation 2015-12-30 15:45:41 +02:00
Alex Schroeder
0978882383 Estonian translation 2015-12-30 15:11:57 +02:00
Alex Schroeder
bc3ec732bf typo 2015-11-29 10:25:15 +01:00
Alex Schroeder
adb7430573 supplementing the German transltion 2015-11-29 10:10:47 +01:00
Alex Schroeder
c9557736a2 nosearch.pl: code style
It seems like oddtrans does not pick up the strings with double quotes?
It's weird, but it does not matter anyway, because we will switch to gettext
sooner or later.
2015-10-31 02:58:00 +02:00
Alex Schroeder
3d38db2ae6 Updates to Russian translation (70% → 85%) 2015-10-31 02:56:39 +02:00
Alex Schroeder
a99959e0cc Full support for arrayref in $StyleSheet 2015-10-26 01:03:42 +02:00
Alex Schroeder
79dc2a7e49 More fixes for Spanish translation 2015-10-21 16:57:27 +03:00
Alex Schroeder
b4c462bf1e Some fixes for Spanish translation 2015-10-21 16:06:13 +03:00
Alex Schroeder
f6be7ef40f Fix tests ($ShowAll)
$ShowAll was not added to 「our」.
2015-10-21 12:15:25 +03:00
Alex Schroeder
8e49ed1df9 translations/README deleted
This file has to be regenerated periodically, Alexine will do that.
Also, these long one-liners have to be separated into scripts.
I am deleting this file because I'm not willing to update it.
2015-10-21 05:19:56 +03:00
Alex Schroeder
064c82c74f Translation: fix 'non existent' for Spanish, too 2015-10-20 17:31:42 +02:00
Alex Schroeder
adbb358050 Translation: 'non existant' to 'nonexisting' 2015-10-20 17:19:02 +02:00
Alex Schroeder
ede702e811 Updates to Spanish translation
This is a general revision of the current file, and a massive upgrade
from the last date (2002).  Some sentences have been formalized and
have been clarified, including corrections, completing the total of the
translation.
2015-10-20 16:51:28 +02:00
Alex Schroeder
ee54863dd5 Typo in German translation (liefert repeated twice) 2015-10-19 23:21:44 +03:00
Alex Schroeder
f0c9172263 Biscecting -> Bisection (typo) 2015-10-19 23:17:39 +03:00
Alex Schroeder
0bae3b082c Updates to Russian translation 2015-10-19 23:12:58 +03:00
Alex Schroeder
d68bb9ac10 More fixes for $ShowAll
Some modules had to be fixed too!
'showedit' and 'rollback' are not used in modules, so there's nothing to fix.
2015-10-18 03:14:57 +03:00
Alex Schroeder
bbc1e81eed “link blow” → “link below” 2015-10-18 02:48:06 +03:00
Alex Schroeder
a29d3339ac make translations
This adds the subheaders to all the translation files.

for f in modules/translations/*-utf8.pl; do
  perl -e "sub AddModuleDescription { print shift, ' ' };
           do '$f';
	   \$i = 0;
	   map { \$_ || \$i++} values %Translate;
	   printf(qq{%d/%d translations missing\n}, \$i, scalar keys %Translate);";
done

brazilian-portuguese-utf8.pl 237/672 translations missing
bulgarian-utf8.pl 496/672 translations missing
catalan-utf8.pl 259/672 translations missing
chinese-utf8.pl 254/672 translations missing
chinese_cn-utf8.pl 199/672 translations missing
dutch-utf8.pl 459/672 translations missing
finnish-utf8.pl 436/672 translations missing
french-utf8.pl 177/672 translations missing
german-utf8.pl 13/672 translations missing
greek-utf8.pl 242/672 translations missing
hebrew-utf8.pl 555/672 translations missing
italian-utf8.pl 425/672 translations missing
japanese-utf8.pl 5/237 translations missing
korean-utf8.pl 393/672 translations missing
fixme-utf8.pl 672/672 translations missing
polish-utf8.pl 239/672 translations missing
portuguese-utf8.pl 389/672 translations missing
romanian-utf8.pl 514/672 translations missing
russian-utf8.pl 297/672 translations missing
serbian-utf8.pl 526/672 translations missing
spanish-utf8.pl 246/672 translations missing
swedish-utf8.pl 372/672 translations missing
ukrainian-utf8.pl 347/672 translations missing
2015-10-17 23:00:26 +02:00
Alex Schroeder
93632d3137 Translation: "为 %s 建立锁定 。\t"
Removed trailing tab.
2015-10-15 20:12:19 +02:00
Alex Schroeder
63305cd019 Translation: " . . . . "
Removed trailing whitespace.
2015-10-15 20:05:23 +02:00
Alex Schroeder
6941ccc05d Translation: " ... " is no longer translatable 2015-10-15 19:35:08 +02:00
Alex Schroeder
05f8227185 Translations: removed trailing whitespace
Various translation files still had translated strings with trailing
whitespace where the English original did not have any. This has been
removed.
2015-10-15 19:32:12 +02:00
Alex Schroeder
50b8c0ed96 Translation: "Comments on " and "Comment on"
Removed trailing whitespace.
2015-10-15 19:29:35 +02:00
Alex Schroeder
bfa879441b Translations: removed trailing whitespace
Various translation files still had translated strings with trailing
whitespace where the English original did not have any. This has been
removed.
2015-10-15 19:23:42 +02:00
Alex Schroeder
92f264307f Trans.: "Consider banning the IP number as well: "
Remove trailing whitespace. In the German translation, I also replaced a
few instances of "sie" with "Sie".
2015-10-15 19:18:55 +02:00
Alex Schroeder
703ba8d969 Transl.: "Module count (only testable modules): "
Remove trailing whitespace.
2015-10-15 19:15:18 +02:00
Alex Schroeder
54e9eaf563 Translation: "Summary of your changes: "
Remove trailing whitespace.
2015-10-15 19:13:13 +02:00
Alex Schroeder
a3bf23ea32 Translation: "Define external redirect: "
Removed trailing whitespace.
2015-10-15 19:10:59 +02:00
Alex Schroeder
be3587e4a9 Translation: "Internal Page: "
This string was not used correctly. T('Internal Page: ' . $resolved)
means that the string is concatenated with $resolved and then it will be
translated. This means that the translation will never be found. The
correct usage is as follows: Ts('Internal Page: %s', $resolved). The
translation string has therefore been changed to 'Internal Page: %s' and
the translation files have been fixed accordingly.
2015-10-15 19:07:51 +02:00
Alex Schroeder
ba3ffb320e Translation: ", see "
Removed trailing whitespace.
2015-10-15 15:01:51 +02:00
Alex Schroeder
2a3a40220c Translation: "Name: " and "URL: "
Removed trailing whitespace.
2015-10-15 14:55:54 +02:00
Alex Schroeder
91d35130bf Translation: remove trailing whitespace
The German translation contained a stray trailing whitespace.
2015-10-15 14:47:49 +02:00