mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-14 15:26:52 -04:00
added protuguese translation
This commit is contained in:
parent
f3af2fcfba
commit
fd75a46a02
@ -1,18 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
To add a new language, you can add the language to this file.
|
||||
Use the name of the language in this language.
|
||||
Then copy one of the available language files, rename it and
|
||||
translate it into the new language.
|
||||
Use the name of the language in that language.
|
||||
Then copy the English language file "lang_en.xml", rename
|
||||
it and translate it into the new language.
|
||||
|
||||
If you also want to translate the static part of the documentation,
|
||||
you must translate one of the files "static_xx.xml" from the folder
|
||||
"src/test/Resources/Doku".
|
||||
you have to translate one of the files "static_xx.xml" from the
|
||||
folder "src/test/Resources/Docu".
|
||||
|
||||
If you are satisfied with the translation, you can send a pull request.
|
||||
Or you file a new GitHub issue and add the files to this issue.
|
||||
If you are satisfied with the translation, please send me the
|
||||
translated version AND the file "lang_en.xml" you used for the
|
||||
translation! Both files are required to keep track of changes.
|
||||
-->
|
||||
<languages>
|
||||
<lang name="en">English</lang>
|
||||
<lang name="de">Deutsch</lang>
|
||||
<lang name="pt">Portuguese</lang>
|
||||
</languages>
|
||||
|
@ -216,7 +216,7 @@
|
||||
<string name="elem_Seven-Seg-Hex_pin_d">The value at this input is visualized at the display.</string>
|
||||
<string name="elem_Seven-Seg-Hex_pin_dp">This input controls the decimal point.</string>
|
||||
|
||||
<string name="elem_SixteenSeg">16-Segement Display</string>
|
||||
<string name="elem_SixteenSeg">16-Segment Display</string>
|
||||
<string name="elem_SixteenSeg_tt">The LED input has 16 bits which control the segments. The second input controls the decimal point.</string>
|
||||
<string name="elem_SixteenSeg_pin_led">16-bit bus for driving the LEDs.</string>
|
||||
<string name="elem_SixteenSeg_pin_dp">This input controls the decimal point.</string>
|
||||
@ -501,7 +501,7 @@
|
||||
<string name="elem_EEPROMDualPort_tt">A EEPROM module with separate inputs for storing and output for reading the stored data.</string>
|
||||
<string name="elem_EEPROMDualPort_pin_A">The address to read from or write to.</string>
|
||||
<string name="elem_EEPROMDualPort_pin_C">Clock input</string>
|
||||
<string name="elem_EEPROMDualPort_pin_Din">The data to be stored in the RAM.</string>
|
||||
<string name="elem_EEPROMDualPort_pin_Din">The data to be stored in the EEPROM.</string>
|
||||
<string name="elem_EEPROMDualPort_pin_D">The data output pin</string>
|
||||
<string name="elem_EEPROMDualPort_pin_ld">If this input is high the output is activated and the data is visible at the output.</string>
|
||||
<string name="elem_EEPROMDualPort_pin_str">If this input is high and when the clock becomes high, the the data is stored.</string>
|
||||
@ -821,7 +821,7 @@
|
||||
<string name="err_builder_exprNotSupported">Expression {0} not supported</string>
|
||||
<string name="err_builder_operationNotSupported">Operation {0} not supported</string>
|
||||
<string name="err_builder_couldNotFillLUT">Error creating the lookup table.</string>
|
||||
<string name="err_burnError">More than one output is active on a wire, causing a short circuit.</string>
|
||||
<string name="err_burnError">More then one output is active on a wire, causing a short circuit.</string>
|
||||
<string name="err_pullUpAndDown">It is not allowed to connect a pull-up and pull-down resistor to the same net.</string>
|
||||
<string name="err_cannotAnalyse_N">Cannot analyse Node {0}</string>
|
||||
<string name="err_containsVarAndNotVar">Contains [var] and [not var]</string>
|
||||
@ -909,7 +909,7 @@
|
||||
<string name="err_errorParsingTestdata">Error parsing the test data.</string>
|
||||
<string name="err_backtrackOf_N_isImpossible">The model component {0} can not be analysed.</string>
|
||||
<string name="err_errorInPowerSupply">Error in wiring of power supply at {0}.</string>
|
||||
<string name="err_pinIsNotANumber_N">The pin nummer {0} is not a integer!</string>
|
||||
<string name="err_pinIsNotANumber_N">The pin number {0} is not an integer!</string>
|
||||
<string name="err_vhdlExporting">Error during export to VHDL.</string>
|
||||
<string name="err_vhdlNoEntity_N">No VHDL code for {0} available!</string>
|
||||
<string name="err_verilogNoElement_N">No Verilog code for {0} available!</string>
|
||||
@ -967,7 +967,7 @@
|
||||
The VHDL simulator ghdl does not seem to be installed. Install ghdl (http://ghdl.free.fr/) and try again. If there are still problems, check the path to the ghdl executable in the Digital settings.
|
||||
</string>
|
||||
<string name="err_iverilogNotInstalled">
|
||||
The Verilog simulator Icarus does not seem to be installed. Install ghdl (http://iverilog.icarus.com/) and try again. If there are still problems, check the path to the iverilog executable in the Digital settings.
|
||||
The Verilog simulator Icarus does not seem to be installed. Install iverilog (http://iverilog.icarus.com/) and try again. If there are still problems, check the path to the iverilog executable in the Digital settings.
|
||||
</string>
|
||||
<string name="err_errorAnalysingCircuit_N">Error analysing the circuit: {0}</string>
|
||||
<string name="err_romNeedsALabelToBeExported">Every ROM needs a unique label to be exported!</string>
|
||||
@ -1045,7 +1045,7 @@
|
||||
<string name="key_Value">Value</string><!-- Const -->
|
||||
<string name="key_Value_tt">The value of the constant.</string>
|
||||
<string name="key_Width">Width</string>
|
||||
<string name="key_Width_tt">With of symbol if this circuit is used as an component in an other circuit.</string>
|
||||
<string name="key_Width_tt">Width of symbol if this circuit is used as an component in an other circuit.</string>
|
||||
<string name="key_Height">Height</string>
|
||||
<string name="key_Height_tt">Height of symbol if this circuit is used as an component in an other circuit.</string>
|
||||
<string name="key_autoReload">Reload at model start</string><!-- ROM -->
|
||||
@ -1138,7 +1138,7 @@
|
||||
the pin assignment when programming a CPLD.
|
||||
If there are several bits, all pin numbers can be specified as a comma-separated list.</string>
|
||||
<string name="key_pinCount">Number of DIL pins</string>
|
||||
<string name="key_pinCount_tt">Number of pins. A zero means that the number od pins is determined automatically.</string>
|
||||
<string name="key_pinCount_tt">Number of pins. A zero means that the number of pins is determined automatically.</string>
|
||||
<string name="key_defTreeSelect">Component tree view is visible at startup.</string>
|
||||
<string name="key_defTreeSelect_tt">If set, the component tree view is enabled at startup.</string>
|
||||
<string name="key_inverterConfig">inverted Inputs</string><!-- And, NAnd, Or, NOr, XOr, XNOr, RS_FF, JK_FF, D_FF, T_FF, JK_FF_AS, D_FF_AS, Counter -->
|
||||
@ -1242,7 +1242,7 @@
|
||||
<string name="key_shapeType">Shape</string>
|
||||
<string name="key_shapeType_tt">The shape to be used for the representation of the circuit in an embedding circuit.
|
||||
In the "Simple" mode, the inputs are displayed on the left and the outputs on the right side of a simple rectangle.
|
||||
With "Layout", the position of the inputs and outputs and and their orientation in the circuit determines
|
||||
With "Layout", the position of the inputs and outputs and their orientation in the circuit determines
|
||||
the position of the pins. Here are also pins at the top or bottom possible.
|
||||
When selecting "DIL-Chip", a DIL housing is used to display the circuit. The pin numbers of the inputs and outputs
|
||||
determine the position of the pins in this case.
|
||||
@ -1478,7 +1478,7 @@
|
||||
<string name="menu_showDataGraph_tt">Shows a graph with the measured values in a separate window.</string>
|
||||
<string name="menu_showDataTable">Show measurement value table</string>
|
||||
<string name="menu_showDataTable_tt">Show table with the measured values in a separate window.</string>
|
||||
<string name="menu_exportZIP">Export tos ZIP file</string>
|
||||
<string name="menu_exportZIP">Export to ZIP file</string>
|
||||
<string name="menu_exportZIP_tt">Exports the circuit as a ZIP file.
|
||||
The ZIP file thus contains all the files that are necessary for the operation of the circuit.</string>
|
||||
<string name="menu_labelPins">Label Inputs and Outputs</string>
|
||||
@ -1571,7 +1571,7 @@
|
||||
<string name="msg_noKVMapAvailable">No KV map available!</string>
|
||||
<string name="msg_dataNotUpdatedAnymore">Data will not be updated anymore!</string>
|
||||
<string name="msg_modifyThisAttribute">Modify this Value</string>
|
||||
<string name="msg_invalidEditorValue">On of the fields contains a invalid value!</string>
|
||||
<string name="msg_invalidEditorValue">One of the fields contains a invalid value!</string>
|
||||
<string name="msg_create CHNFile">Creation of CHN file.</string>
|
||||
<string name="msg_tableHasManyRowsConfirm">The table is very large, the export may take a while.
|
||||
Start export anyway?</string>
|
||||
@ -1582,7 +1582,7 @@
|
||||
|
||||
<string name="msg_errorClosingExternalProcess">Could not close external process!</string>
|
||||
|
||||
<string name="msg_checkResult">Check Resukt:</string>
|
||||
<string name="msg_checkResult">Check Result:</string>
|
||||
<string name="btn_checkCode">Check</string>
|
||||
<string name="btn_checkCode_tt">Starts the application to check if the entered code is correct.
|
||||
If this is not the case, the error message of the external application is displayed.
|
||||
|
1811
src/main/resources/lang/lang_pt.xml
Normal file
1811
src/main/resources/lang/lang_pt.xml
Normal file
File diff suppressed because it is too large
Load Diff
1844
src/main/resources/lang/lang_pt_ref.xml
Normal file
1844
src/main/resources/lang/lang_pt_ref.xml
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,13 +7,12 @@ package de.neemann.digital.lang;
|
||||
|
||||
import de.neemann.digital.integration.Resources;
|
||||
import de.neemann.gui.language.Bundle;
|
||||
import de.neemann.gui.language.Language;
|
||||
import junit.framework.AssertionFailedError;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
*/
|
||||
@ -21,13 +20,14 @@ public class TestLang extends TestCase {
|
||||
private static final String SOURCEPATH = "/home/hneemann/Dokumente/Java/digital/src/main/java";
|
||||
|
||||
private HashMap<String, LangSet> map = new HashMap<>();
|
||||
private Bundle bundle;
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
Bundle b = new Bundle("lang/lang");
|
||||
addFrom(b, "en");
|
||||
addFrom(b, "de");
|
||||
bundle = new Bundle("lang/lang");
|
||||
addKeysFrom("en");
|
||||
addKeysFrom("de");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -70,6 +70,68 @@ public class TestLang extends TestCase {
|
||||
fail("there are unused language keys: " + sb.toString());
|
||||
}
|
||||
|
||||
public void testAdditionalLanguages() {
|
||||
de.neemann.gui.language.Resources master = bundle.getResources("en");
|
||||
for (Language l : bundle.getSupportedLanguages()) {
|
||||
if (!(l.getName().equals("de") || l.getName().equals("en")))
|
||||
checkLanguage(master, l);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkLanguage(de.neemann.gui.language.Resources master, Language l) {
|
||||
ArrayList<String> missing = new ArrayList<>();
|
||||
final de.neemann.gui.language.Resources langResources = bundle.getResources(l.getName());
|
||||
Set<String> langKeys = langResources.getKeys();
|
||||
for (String k : master.getKeys()) {
|
||||
if (!langKeys.contains(k))
|
||||
missing.add(k);
|
||||
}
|
||||
if (!missing.isEmpty()) {
|
||||
System.out.println("Missing language keys for: " + l);
|
||||
missing.sort(String::compareTo);
|
||||
for (String k : missing) {
|
||||
System.out.println(" <string name=\"" + k + "\">" + master.get(k) + "</string>");
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<String> obsolete = new ArrayList<>();
|
||||
for (String k : langKeys) {
|
||||
if (!master.getKeys().contains(k))
|
||||
obsolete.add(k);
|
||||
}
|
||||
if (!obsolete.isEmpty()) {
|
||||
System.out.println("Obsolete language keys for: " + l);
|
||||
missing.sort(String::compareTo);
|
||||
for (String k : obsolete) {
|
||||
System.out.println(" " + k);
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<String> modified = new ArrayList<>();
|
||||
de.neemann.gui.language.Resources origKeys =
|
||||
new de.neemann.gui.language.Resources(
|
||||
getClass().getClassLoader().getResourceAsStream("lang/lang_" + l.getName() + "_ref.xml"));
|
||||
for (String k : master.getKeys()) {
|
||||
String m = master.get(k);
|
||||
String o = origKeys.get(k);
|
||||
if (m != null && o != null && !m.equals(o))
|
||||
modified.add(k);
|
||||
}
|
||||
|
||||
if (!modified.isEmpty()) {
|
||||
System.out.println("Modified language keys for: " + l);
|
||||
missing.sort(String::compareTo);
|
||||
for (String k : modified) {
|
||||
System.out.println(" key: "+k);
|
||||
System.out.println(" old: "+origKeys.get(k));
|
||||
System.out.println(" new: "+master.get(k));
|
||||
System.out.println(" old: "+langResources.get(k));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static File getSourceFiles() {
|
||||
String sources = System.getProperty("sources");
|
||||
if (sources == null) {
|
||||
@ -146,8 +208,8 @@ public class TestLang extends TestCase {
|
||||
assertTrue("key " + key + " not present!", map.containsKey(key));
|
||||
}
|
||||
|
||||
private void addFrom(Bundle b, String lang) {
|
||||
for (String k : b.getResources(lang).getKeys()) {
|
||||
private void addKeysFrom(String lang) {
|
||||
for (String k : bundle.getResources(lang).getKeys()) {
|
||||
LangSet l = map.get(k);
|
||||
if (l == null) {
|
||||
l = new LangSet();
|
||||
|
Loading…
x
Reference in New Issue
Block a user