Skip to content

Commit

Permalink
support for french and dutch table headers. close #2119
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Oct 10, 2023
1 parent d1ea9d2 commit c1587c1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -871,9 +871,11 @@
<Component class="javax.swing.JComboBox" name="cmbTableHeadersLanguage">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="2">
<StringArray count="4">
<StringItem index="0" value="DE"/>
<StringItem index="1" value="EN"/>
<StringItem index="2" value="FR"/>
<StringItem index="3" value="NL"/>
</StringArray>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Sprache der Tabellenspaltenbezeichner"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
}
});

cmbTableHeadersLanguage.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "DE", "EN" }));
cmbTableHeadersLanguage.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "DE", "EN", "FR", "NL" }));
cmbTableHeadersLanguage.setToolTipText("Sprache der Tabellenspaltenbezeichner");

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
Expand Down Expand Up @@ -1764,6 +1764,10 @@ private StyledCalculationTable getTimesheetPositionsAsTable(List<TimesheetPositi
StyledCalculationTable ct = new StyledCalculationTable();
if("EN".equalsIgnoreCase(language))
ct.addHeaders("Duration", "Project", "Description", "Person");
else if("FR".equalsIgnoreCase(language))
ct.addHeaders("Durée", "Projet", "Activité", "Personne");
else if("NL".equalsIgnoreCase(language))
ct.addHeaders("Tijd", "Project", "handeling", "Persoon");
else
ct.addHeaders("Zeit", "Projekt", "Tätigkeit", "Person");

Expand Down Expand Up @@ -1819,6 +1823,10 @@ private StyledCalculationTable getInvoicePositionsAsTable(String language) {
StyledCalculationTable ct = new StyledCalculationTable();
if("EN".equalsIgnoreCase(language))
ct.addHeaders("", "Position", "Qty", "Rate", "Amount");
else if("FR".equalsIgnoreCase(language))
ct.addHeaders("", "Article de facture", "Quantité", "Prix unitaire", "Au total");
else if("NL".equalsIgnoreCase(language))
ct.addHeaders("", "Factuuritem", "Aantal", "Prijs", "Totaal");
else
ct.addHeaders("", "Position", "Menge", "Einzel", "Gesamt");
if (ServerSettings.getInstance().getSettingAsBoolean("plugins.global.tableproperties.table.emptyRows", true)) {
Expand Down Expand Up @@ -1860,6 +1868,14 @@ private StyledCalculationTable getInvoicePositionsAsTable(String language) {
footerRowNet=ct.addRow("", "Net", "", "", cf.format(totalNet) + " " + this.cmbCurrency.getSelectedItem());
footerRowTaxes = ct.addRow("", "Tax", "", "", cf.format(totalTax) + " " + this.cmbCurrency.getSelectedItem());
footerRowTotal = ct.addRow("", "Balance Due", "", "", lblInvoiceTotal.getText() + " " + this.cmbCurrency.getSelectedItem());
} else if("FR".equalsIgnoreCase(language)) {
footerRowNet=ct.addRow("", "Sous Total", "", "", cf.format(totalNet) + " " + this.cmbCurrency.getSelectedItem());
footerRowTaxes = ct.addRow("", "TPS", "", "", cf.format(totalTax) + " " + this.cmbCurrency.getSelectedItem());
footerRowTotal = ct.addRow("", "Montant Dû", "", "", lblInvoiceTotal.getText() + " " + this.cmbCurrency.getSelectedItem());
} else if("NL".equalsIgnoreCase(language)) {
footerRowNet=ct.addRow("", "Subtotal", "", "", cf.format(totalNet) + " " + this.cmbCurrency.getSelectedItem());
footerRowTaxes = ct.addRow("", "BTW", "", "", cf.format(totalTax) + " " + this.cmbCurrency.getSelectedItem());
footerRowTotal = ct.addRow("", "Totaal te betalen", "", "", lblInvoiceTotal.getText() + " " + this.cmbCurrency.getSelectedItem());
} else {
footerRowNet=ct.addRow("", "Netto", "", "", cf.format(totalNet) + " " + this.cmbCurrency.getSelectedItem());
footerRowTaxes = ct.addRow("", "USt.", "", "", cf.format(totalTax) + " " + this.cmbCurrency.getSelectedItem());
Expand Down

0 comments on commit c1587c1

Please sign in to comment.