summaryrefslogtreecommitdiff
path: root/lib/VNDB/Func.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2016-01-21 18:44:49 +0100
committerYorhel <git@yorhel.nl>2016-01-23 13:08:59 +0100
commitc5879de315c4fdaf5be0ca85116acaaee5cc57f0 (patch)
treef0740431e4b9e1fa5cacc8cbe8836e59fc90dbdd /lib/VNDB/Func.pm
parenta6836df277867d73a71c55797984c947449772cc (diff)
L10N: Intern all VNDB::Handler::* stuff
Most of these replacements were automated. This ended up being less work than I had anticipated. I also fixed a few minor bugs along the way, but probably introduced more than I fixed.
Diffstat (limited to 'lib/VNDB/Func.pm')
-rw-r--r--lib/VNDB/Func.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/VNDB/Func.pm b/lib/VNDB/Func.pm
index 7549207f..6af8f5bf 100644
--- a/lib/VNDB/Func.pm
+++ b/lib/VNDB/Func.pm
@@ -11,7 +11,7 @@ use VNDBUtil;
our @EXPORT = (@VNDBUtil::EXPORT, qw|
clearfloat cssicon tagscore mt minage fil_parse fil_serialize parenttags
childtags charspoil imgpath imgurl
- fmtvote fmtmedia fmtvnlen fmtage fmtdatestr fmtdate fmtuser fmtrating
+ fmtvote fmtmedia fmtvnlen fmtage fmtdatestr fmtdate fmtuser fmtrating fmtspoil
json_encode json_decode script_json
form_compare
|);
@@ -287,6 +287,14 @@ sub fmtrating {
'masterpiece']->[shift()-1];
}
+# Turn a spoiler level into a string
+sub fmtspoil {
+ ['neutral',
+ 'no spoiler',
+ 'minor spoiler',
+ 'major spoiler']->[shift()+1];
+}
+
# JSON::XS::encode_json converts input to utf8, whereas the below functions