'description' => 'An alternate ordering of fields for the New Customer and Edit Customer screens.',
'type' => 'checkbox',
},
+
+ {
+ 'key' => 'translate-auto-insert',
+ 'section' => '',
+ 'description' => 'Auto-insert untranslated strings for selected non-en_US locales with their default/en_US values. DO NOT TURN THIS ON.',
+ 'type' => 'select-sub',
+ 'multiple' => 1,
+ 'options_sub' => sub { map { $_ => '' }
+ grep { $_ ne 'en_US' } FS::Locales::locales;
+ },
+ 'option_sub' => sub { ''; },
+ },
{ key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
warn "WARNING: message for msgcode $msgcode in locale $locale not found"
unless $locale eq 'en_US';
$cache{$locale}->{$msgcode} = $msgcode;
+
+ my @translate_auto_insert = $conf->config('translate-auto-insert');
+ if ( $locale ne 'en_US' && grep { $_ eq $locale } @translate_auto_insert ) {
+
+ # :(
+ my $newmsgcat = new FS::Record('msgcat', { locale => $locale,
+ msgcode => $msgcode,
+ msg => $msgcode,
+ });
+ warn "WARNING: auto-inserting message for msgcode $msgcode in locale $locale";
+ $newmsgcat->insert;
+ }
}
}