aboutsummaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorperky <perky@FreeBSD.org>2002-07-07 08:05:11 +0800
committerperky <perky@FreeBSD.org>2002-07-07 08:05:11 +0800
commitae8f0d43fbc17648ba44a073d1964de8b56e6dc7 (patch)
tree5a9c45d3a0fe14a82575505b72ccf43f5c57896f /Tools
parent0b230dffa92ee9c0f1dda511dfd63b375ace983c (diff)
downloadfreebsd-ports-gnome-ae8f0d43fbc17648ba44a073d1964de8b56e6dc7.tar.gz
freebsd-ports-gnome-ae8f0d43fbc17648ba44a073d1964de8b56e6dc7.tar.zst
freebsd-ports-gnome-ae8f0d43fbc17648ba44a073d1964de8b56e6dc7.zip
Add l10n prefix to default module name.
Approved by: will
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/addport16
1 files changed, 14 insertions, 2 deletions
diff --git a/Tools/scripts/addport b/Tools/scripts/addport
index c943bd344ff1..046f42aaa4f0 100755
--- a/Tools/scripts/addport
+++ b/Tools/scripts/addport
@@ -63,6 +63,17 @@ my $nomkdir = $opts{'m'};
my $addlchk = $opts{'a'};
my $nofetch = $opts{'f'};
my $currentdir = abs_path(".");
+my %l10nprefix = (
+ 'chinese' => 'zh-',
+ 'french' => 'fr-',
+ 'german' => 'de-',
+ 'hebrew' => 'iw-',
+ 'japanese' => 'ja-',
+ 'korean' => 'ko-',
+ 'russian' => 'ru-',
+ 'ukrainian' => 'uk-',
+ 'vietnamese' => 'vi-',
+);
my $tmpdir;
my $repo;
@@ -193,9 +204,10 @@ foreach my $thisdir (@dirs) {
chomp(my $cvs_category = $category);
$cvs_category =~ s/-/_/g;
- $module = $portname;
+ $module = "$l10nprefix{$category}$portname";
+
if ($interactive) {
- if (prompt("Port will be added as module $portname. OK? ")) {
+ if (prompt("Port will be added as module $module. OK? ")) {
do {
$module = query("Preferred module name for $module? ");
} while (prompt("Is the new module name $module OK? "));