Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 08882e8c

Von Moritz Bunkus vor fast 18 Jahren hinzugefügt

  • ID 08882e8ce50b1e317d313dac8f27d306dae4492d
  • Vorgänger 367bf289
  • Nachfolger 3edbebcc

Sprachentabelle um Felder erweitert, um bei jeder Sprache auch die Ausgabeformate für Zahlen und Datumsangaben zu speichern und zu verwalten.

Unterschiede anzeigen:

bin/mozilla/am.pl
1532 1532

  
1533 1533
  $form->{title} = $locale->text('Languages');
1534 1534

  
1535
  @column_index = qw(description template_code article_code);
1535
  @column_index = qw(description template_code article_code output_numberformat output_dateformat output_longdates);
1536 1536

  
1537 1537
  $column_header{description} =
1538 1538
      qq|<th class=listheading width=60%>|
......
1546 1546
      qq|<th class=listheading>|
1547 1547
    . $locale->text('Article Code')
1548 1548
    . qq|</th>|;
1549
  $column_header{output_numberformat} =
1550
      qq|<th class=listheading>|
1551
    . $locale->text('Number Format')
1552
    . qq|</th>|;
1553
  $column_header{output_dateformat} =
1554
      qq|<th class=listheading>|
1555
    . $locale->text('Date Format')
1556
    . qq|</th>|;
1557
  $column_header{output_longdates} =
1558
      qq|<th class=listheading>|
1559
    . $locale->text('Long Dates')
1560
    . qq|</th>|;
1549 1561

  
1550 1562
  $form->header;
1551 1563

  
......
1584 1596
    $column_data{template_code}           = qq|<td align=right>$ref->{template_code}</td>|;
1585 1597
    $column_data{article_code} =
1586 1598
      qq|<td align=right>$ref->{article_code}</td>|;
1599
    $column_data{output_numberformat} =
1600
      "<td nowrap>" .
1601
      ($ref->{output_numberformat} ? $ref->{output_numberformat} :
1602
       $locale->text("use program settings")) .
1603
      "</td>";
1604
    $column_data{output_dateformat} =
1605
      "<td nowrap>" .
1606
      ($ref->{output_dateformat} ? $ref->{output_dateformat} :
1607
       $locale->text("use program settings")) .
1608
      "</td>";
1609
    $column_data{output_longdates} =
1610
      "<td nowrap>" .
1611
      ($ref->{output_longdates} ? $locale->text("Yes") : $locale->text("No")) .
1612
      "</td>";
1587 1613

  
1588 1614
    map { print "$column_data{$_}\n" } @column_index;
1589 1615

  
......
1646 1672

  
1647 1673
  $form->header;
1648 1674

  
1675
  my $numberformat =
1676
    qq|<option value="">| . $locale->text("use program settings") .
1677
    qq|</option>|;
1678
  foreach $item (qw(1,000.00 1000.00 1.000,00 1000,00)) {
1679
    $numberformat .=
1680
      ($item eq $form->{output_numberformat})
1681
      ? "<option selected>$item"
1682
      : "<option>$item"
1683
      . "</option>";
1684
  }
1685

  
1686
  my $dateformat =
1687
    qq|<option value="">| . $locale->text("use program settings") .
1688
    qq|</option>|;
1689
  foreach $item (qw(mm-dd-yy mm/dd/yy dd-mm-yy dd/mm/yy dd.mm.yy yyyy-mm-dd)) {
1690
    $dateformat .=
1691
      ($item eq $form->{output_dateformat})
1692
      ? "<option selected>$item"
1693
      : "<option>$item"
1694
      . "</option>";
1695
  }
1696

  
1649 1697
  print qq|
1650 1698
<body>
1651 1699

  
......
1661 1709
  <tr height="5"></tr>
1662 1710
  <tr>
1663 1711
    <th align=right>| . $locale->text('Language') . qq|</th>
1664
    <td><input name=description size=30 value="$form->{description}"></td>
1712
    <td><input name=description size=30 value="| . $form->quote($form->{description}) . qq|"></td>
1665 1713
  <tr>
1666 1714
  <tr>
1667 1715
    <th align=right>| . $locale->text('Template Code') . qq|</th>
1668
    <td><input name=template_code size=5 value=$form->{template_code}></td>
1716
    <td><input name=template_code size=5 value="| . $form->quote($form->{template_code}) . qq|"></td>
1669 1717
  </tr>
1670 1718
  <tr>
1671 1719
    <th align=right>| . $locale->text('Article Code') . qq|</th>
1672
    <td><input name=article_code size=10 value=$form->{article_code}></td>
1720
    <td><input name=article_code size=10 value="| . $form->quote($form->{article_code}) . qq|"></td>
1721
  </tr>
1722
  <tr>
1723
    <th align=right>| . $locale->text('Number Format') . qq|</th>
1724
    <td><select name="output_numberformat">$numberformat</select></td>
1725
  </tr>
1726
  <tr>
1727
    <th align=right>| . $locale->text('Date Format') . qq|</th>
1728
    <td><select name="output_dateformat">$dateformat</select></td>
1729
  </tr>
1730
  <tr>
1731
    <th align=right>| . $locale->text('Long Dates') . qq|</th>
1732
    <td><input type="radio" name="output_longdates" value="1"| .
1733
    ($form->{output_longdates} ? " checked" : "") .
1734
    qq|>| . $locale->text("Yes") .
1735
    qq|<input type="radio" name="output_longdates" value="0"| .
1736
    ($form->{output_longdates} ? "" : " checked") .
1737
    qq|>| . $locale->text("No") .
1738
    qq|</td>
1673 1739
  </tr>
1674 1740
  <td colspan=2><hr size=3 noshade></td>
1675 1741
  </tr>

Auch abrufbar als: Unified diff