Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some localizations #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion titlecase
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
#!/usr/bin/perl
use 5.008001; use strict; use warnings; use utf8;

our @SMALL_WORD
# Added localizations to https://github.com/ap/titlecase
our @SMALL_WORD_EN
= qw/ (?<!q&)a an and as at(?!&t) but by en for if in of on or the to v[.]? via vs[.]? /;
our @SMALL_WORD_DE
= qw/ der das die dem den des ein eine einem einen einer eines und oder aber als bei mit nach von vom zu in im ins aus auf aufs für mit bis über übers überm übern unter unterm untern unters vor vorm vorn vors zum zur durch durchs ohne gegen um an am ans /;
our @SMALL_WORD_PT
= qw/ a as o os um uma uns umas à às ao aos como da das de do dos e na nas no nospelo pela pelos pelas em com sem até após como ante por para sob sobre per entre/;
our @SMALL_WORD_ES
= qw/ el la las los un una unos unas y e o u ni a as os de del al en con por para sobre entre sin hacia tras bajo ante tras hasta según desde durante mediante según /;
our @SMALL_WORD_FR
= qw/ le la les un une à au aux avec chez dans de des du en et pour par sur vers sous sans hors près lors dès via contre/;
our @SMALL_WORD_IT
= qw/ la il l' lo le i gli uno una a al all' alla alle da dal dall' dagli dalli dalle delle dei degli del di in nel nell' nelle nei negli per su con tra fra senza sotto dopo verso /;
our @SMALL_WORD = ( @SMALL_WORD_EN, @SMALL_WORD_PT, @SMALL_WORD_DE, @SMALL_WORD_ES, @SMALL_WORD_FR, @SMALL_WORD_IT );

my $apos = q/ (?: ['’] [[:lower:]]* )? /;

Expand Down