Committer: sbelyaev
LJSUP-10089: Months names are stored in Site.ml_text['entryform.choose_date']U trunk/htdocs/editjournal.bml U trunk/htdocs/update.bml
Modified: trunk/htdocs/editjournal.bml =================================================================== --- trunk/htdocs/editjournal.bml 2011-10-24 10:47:49 UTC (rev 20415) +++ trunk/htdocs/editjournal.bml 2011-10-24 11:05:47 UTC (rev 20416) @@ -61,13 +61,16 @@ entryform.sticky.edit entryform.choose_date/); } - - my @ml_months; - push @ml_months, map { LJ::Lang::month_long_langcode($_) } (1 .. 12); + + # append months names tranlation to Site.ml_text['entryform.choose_date'] + my $ml_months_texts; + my @ml_months = map { LJ::Lang::month_long_langcode($_) } (1 .. 12); foreach my $month_ml_name (@ml_months) { - LJ::need_string($month_ml_name); + $ml_months_texts->{$month_ml_name} = LJ::Lang::ml($month_ml_name); } + $LJ::JSML{'entryform.choose_date'} = $ml_months_texts; + return LJ::bad_input("You must be authenticated as a person.") unless $remote->is_personal || $remote->is_identity; Modified: trunk/htdocs/update.bml =================================================================== --- trunk/htdocs/update.bml 2011-10-24 10:47:49 UTC (rev 20415) +++ trunk/htdocs/update.bml 2011-10-24 11:05:47 UTC (rev 20416) @@ -758,12 +758,16 @@ my $is_sup = LJ::SUP->is_remote_sup() ? 1 : 0; LJ::need_string('entryform.close.confirm'); - my @ml_months; - push @ml_months, map { LJ::Lang::month_long_langcode($_) } (1 .. 12); + + # append months names tranlation to Site.ml_text['entryform.choose_date'] + my $ml_months_texts; + my @ml_months = map { LJ::Lang::month_long_langcode($_) } (1 .. 12); foreach my $month_ml_name (@ml_months) { - LJ::need_string($month_ml_name); + $ml_months_texts->{$month_ml_name} = LJ::Lang::ml($month_ml_name); } + $LJ::JSML{'entryform.choose_date'} = $ml_months_texts; + $ret .= qq^ <script type="text/javascript"> // ensure that we're not being displayed in an iframe;