8000 Merge remote-tracking branch 'arduino/master' · arduino/Arduino@bf1537f · GitHub
[go: up one dir, main page]

Skip to content

Commit bf1537f

Browse files
committed
Merge remote-tracking branch 'arduino/master'
2 parents 6e09128 + 3d3fc08 commit bf1537f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1789
-1763
lines changed

app/src/cc/arduino/packages/formatter/AStyle.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ public void run() {
9191
int line = getLineOfOffset(textArea);
9292
int lineOffset = getLineOffset(textArea, line);
9393

94-
editor.getTextArea().getUndoManager().beginInternalAtomicEdit();
94+
textArea.getUndoManager().beginInternalAtomicEdit();
95+
editor.removeAllLineHighlights();
9596
editor.setText(formattedText);
9697
editor.getSketch().setModified(true);
97-
editor.getTextArea().getUndoManager().endInternalAtomicEdit();
98+
textArea.getUndoManager().endInternalAtomicEdit();
9899

99100
if (line != -1 && lineOffset != -1) {
100101
try {

app/src/cc/arduino/view/findreplace/FindReplace.form

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
<Properties>
55
<Property name="defaultCloseOperation" type="int" value="2"/>
66
<Property name="title" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
7-
<Connection code="_(&quot;Find&quot;)" type="code"/>
7+
<Connection code="tr(&quot;Find&quot;)" type="code"/>
88
</Property>
9+
<Property name="resizable" type="boolean" value="false"/>
910
</Properties>
1011
<SyntheticProperties>
1112
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
@@ -84,7 +85,7 @@
8485
<Component class="javax.swing.JLabel" name="findLabel">
8586
<Properties>
8687
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
87-
<Connection code="_(&quot;Find:&quot;)" type="code"/>
88+
<Connection code="tr(&quot;Find:&quot;)" type="code"/>
8889
</Property>
8990
</Properties>
9091
<AuxValues>
@@ -100,7 +101,7 @@
100101
<Component class="javax.swing.JLabel" name="replaceLabel">
101102
<Properties>
102103
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
103-
<Connection code="_(&quot;Replace with:&quot;)" type="code"/>
104+
<Connection code="tr(&quot;Replace with:&quot;)" type="code"/>
104105
</Property>
105106
</Properties>
106107
<AuxValues>
@@ -117,22 +118,22 @@
117118
<Properties>
118119
<Property name="selected" type="boolean" value="true"/>
119120
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
120-
<Connection code="_(&quot;Ignore Case&quot;)" type="code"/>
121+
<Connection code="tr(&quot;Ignore Case&quot;)" type="code"/>
121122
</Property>
122123
</Properties>
123124
</Component>
124125
<Component class="javax.swing.JCheckBox" name="wrapAroundBox">
125126
<Properties>
126127
<Property name="selected" type="boolean" value="true"/>
127128
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
128-
<Connection code="_(&quot;Wrap Around&quot;)" type="code"/>
129+
<Connection code="tr(&quot;Wrap Around&quot;)" type="code"/>
129130
</Property>
130131
</Properties>
131132
</Component>
132133
<Component class="javax.swing.JCheckBox" name="searchAllFilesBox">
133134
<Properties>
134135
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
135-
<Connection code="_(&quot;Search all Sketch Tabs&quot;)" type="code"/>
136+
<Connection code="tr(&quot;Search all Sketch Tabs&quot;)" type="code"/>
136137
</Property>
137138
</Properties>
138139
</Component>
@@ -143,7 +144,7 @@
143144
<Component class="javax.swing.JButton" name="findButton">
144145
<Properties>
145146
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
146-
<Connection code="_(&quot;Find&quot;)" type="code"/>
147+
<Connection code="tr(&quot;Find&quot;)" type="code"/>
147148
</Property>
148149
</Properties>
149150
<Events>
@@ -153,7 +154,7 @@
153154
<Component class="javax.swing.JButton" name="previousButton">
154155
<Properties>
155156
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
156-
<Connection code="_(&quot;Previous&quot;)" type="code"/>
157+
<Connection code="tr(&quot;Previous&quot;)" type="code"/>
157158
</Property>
158159
</Properties>
159160
<Events>
@@ -163,7 +164,7 @@
163164
<Component class="javax.swing.JButton" name="replaceFindButton">
164165
<Properties>
165166
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
166-
<Connection code="_(&quot;Replace &amp; Find&quot;)" type="code"/>
167+
<Connection code="tr(&quot;Replace &amp; Find&quot;)" type="code"/>
167168
</Property>
168169
</Properties>
169170
<Events>
@@ -173,7 +174,7 @@
173174
<Component class="javax.swing.JButton" name="replaceButton">
174175
<Properties>
175176
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
176-
<Connection code="_(&quot;Replace&quot;)" type="code"/>
177+
<Connection code="tr(&quot;Replace&quot;)" type="code"/>
177178
</Property>
178179
</Properties>
179180
<Events>
@@ -183,7 +184,7 @@
183184
<Component class="javax.swing.JButton" name="replaceAllButton">
184185
<Properties>
185186
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
186-
<Connection code="_(&quot;Replace All&quot;)" type="code"/>
187+
<Connection code="tr(&quot;Replace All&quot;)" type="code"/>
187188
</Property>
188189
</Properties>
189190
<Events>

app/src/cc/arduino/view/findreplace/FindReplace.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ private void initComponents() {
138138

139139
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
140140
setTitle(tr("Find"));
141+
setResizable(false);
141142

142143
findLabel.setText(tr("Find:"));
143144

app/src/processing/app/Editor.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
import processing.app.helpers.OSUtils;
4242
import processing.app.helpers.PreferencesMapException;
4343
import processing.app.legacy.PApplet;
44-
import processing.app.syntax.PdeKeywords;
4544
import processing.app.syntax.ArduinoTokenMakerFactory;
45+
import processing.app.syntax.PdeKeywords;
4646
import processing.app.syntax.SketchTextArea;
4747
import processing.app.tools.DiscourseFormat;
4848
import processing.app.tools.MenuScroller;
@@ -2006,7 +2006,7 @@ public BuildHandler(boolean verbose, boolean saveHex) {
20062006
@Override
20072007
public void run() {
20082008
try {
2009-
textarea.removeAllLineHighlights();
2009+
removeAllLineHighlights();
20102010
sketch.prepare();
20112011
sketch.build(verbose, saveHex);
20122012
statusNotice(tr("Done compiling."));
@@ -2024,6 +2024,15 @@ public void run() {
20242024
}
20252025
}
20262026

2027+
public void removeAllLineHighlights() {
2028+
textarea.removeAllLineHighlights();
2029+
}
2030+
2031+
public void addLineHighlight(int line) throws BadLocationException {
2032+
textarea.addLineHighlight(line, new Color(1, 0, 0, 0.2f));
2033+
textarea.setCaretPosition(textarea.getLineStartOffset(line));
2034+
}
2035+
20272036
private class DefaultStopHandler implements Runnable {
20282037
public void run() {
20292038
// TODO
@@ -2276,7 +2285,7 @@ private void updateTitle() {
22762285
public boolean handleSave(boolean immediately) {
22772286
//stopRunner();
22782287
handleStop(); // 0136
2279-
textarea.removeAllLineHighlights();
2288+
removeAllLineHighlights();
22802289

22812290
if (untitled) {
22822291
return handleSaveAs();
@@ -2430,7 +2439,7 @@ class DefaultExportHandler implements Runnable {
24302439
public void run() {
24312440

24322441
try {
2433-
textarea.removeAllLineHighlights();
2442+
removeAllLineHighlights();
24342443
if (serialMonitor != null) {
24352444
serialMonitor.suspend();
24362445
}
@@ -2876,8 +2885,7 @@ public void statusError(Exception e) {
28762885
System.err.println(I18n.format(tr("Bad error line: {0}"), line));
28772886
} else {
28782887
try {
2879-
textarea.addLineHighlight(line, new Color(1, 0, 0, 0.2f));
2880-
textarea.setCaretPosition(textarea.getLineStartOffset(line));
2888+
addLineHighlight(line);
28812889
} catch (BadLocationException e1) {
28822890
e1.printStackTrace();
28832891
}

app/src/processing/app/Sketch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ protected boolean saveAs() throws IOException {
652652
// make sure there doesn't exist a .cpp file with that name already
653653
// but ignore this situation for the first tab, since it's probably being
654654
// resaved (with the same name) to another location/folder.
655-
for (int i = 0; i < data.getCodeCount(); i++) {
655+
for (int i = 1; i < data.getCodeCount(); i++) {
656656
SketchCode code = data.getCode(i);
657657
if (newName.equalsIgnoreCase(code.getPrettyName())) {
658658
Base.showMessage(tr("Error"),

arduino-core/src/cc/arduino/Compiler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ private void callArduinoBuilder(TargetBoard board, TargetPlatform platform, Targ
207207
}
208208
});
209209

210-
commandLine.addArgument("-libraries", false);
211-
commandLine.addArgument("\"" + BaseNoGui.getSketchbookLibrariesFolder().getAbsolutePath() + "\"", false);
212210
commandLine.addArgument("-libraries", false);
213211
commandLine.addArgument("\"" + BaseNoGui.getContentFile("libraries").getAbsolutePath() + "\"", false);
212+
commandLine.addArgument("-libraries", false);
213+
commandLine.addArgument("\"" + BaseNoGui.getSketchbookLibrariesFolder().getAbsolutePath() + "\"", false);
214214

215215
String fqbn = Stream.of(aPackage.getId(), platform.getId(), board.getId(), boardOptions(board)).filter(s -> !s.isEmpty()).collect(Collectors.joining(":"));
216216
commandLine.addArgument("-fqbn=" + fqbn, false);

arduino-core/src/processing/app/i18n/Resources_ar.po

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ msgstr ""
2020
"Project-Id-Version: Arduino IDE 1.5\n"
2121
"Report-Msgid-Bugs-To: \n"
2222
"POT-Creation-Date: 2012-03-29 10:24-0400\n"
23-
"PO-Revision-Date: 2015-09-30 07:37+0000\n"
24-
"Last-Translator: Federico Fissore <f.fissore@arduino.cc>\n"
23+
"PO-Revision-Date: 2015-09-30 10:05+0000\n"
24+
"Last-Translator: Khaled Saleem Baleesh <Kbaleesh@gmail.com>\n"
2525
"Language-Team: Arabic (http://www.transifex.com/mbanzi/arduino-ide-15/language/ar/)\n"
2626
"MIME-Version: 1.0\n"
2727
"Content-Type: text/plain; charset=UTF-8\n"
@@ -1034,11 +1034,11 @@ msgstr "المتغيرات العامة تستخدم {0} بايت من الذا
10341034

10351035
#: ../../../../../app/src/cc/arduino/view/GoToLineNumber.java:66
10361036
msgid "Go to line"
1037-
msgstr ""
1037+
msgstr "اذهب الى السطر"
10381038

10391039
#: ../../../../../app/src/processing/app/Editor.java:1460
10401040
msgid "Go to line..."
1041-
msgstr ""
1041+
msgstr "اذهب الى السطر..."
10421042

10431043
#: Preferences.java:98
10441044
msgid "Greek"
@@ -1199,7 +1199,7 @@ msgstr "المكتبة مثبته مسبقا: {0} اصدار {1}"
11991199

12001200
#: ../../../../../app/src/cc/arduino/view/GoToLineNumber.java:70
12011201
msgid "Line number:"
1202-
msgstr ""
1202+
msgstr "رقم السطر:"
12031203

12041204
#: Preferences.java:106
12051205
msgid "Lithuaninan"
@@ -2301,7 +2301,7 @@ msgstr "لا يمكن ان يكون لديك ملف .cpp مع نفس اسم ال
23012301

23022302
#: ../../../../../app/src/processing/app/Base.java:2312
23032303
msgid "You can't import a folder that contains your sketchbook"
2304-
msgstr ""
2304+
msgstr "لايمكنك استيراد المجلد الذي يحتوي على شيفرتك البرمجية"
23052305

23062306
#: Sketch.java:421
23072307
msgid ""

arduino-core/src/processing/app/i18n/Resources_ar.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# JAMAL ELMERABETE <jmerabet@procyonst.com>, 2014-2015
1616
# Khaled Saleem Baleesh <Kbaleesh@gmail.com>, 2015
1717
# Mubarak Qahtani <abu-q76@hotmail.com>, 2015
18-
!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2015-09-30 07\:37+0000\nLast-Translator\: Federico Fissore <f.fissore@arduino.cc>\nLanguage-Team\: Arabic (http\://www.transifex.com/mbanzi/arduino-ide-15/language/ar/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ar\nPlural-Forms\: nplurals\=6; plural\=n\=\=0 ? 0 \: n\=\=1 ? 1 \: n\=\=2 ? 2 \: n%100>\=3 && n%100<\=10 ? 3 \: n%100>\=11 && n%100<\=99 ? 4 \: 5;\n
18+
!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2015-09-30 10\:05+0000\nLast-Translator\: Khaled Saleem Baleesh <Kbaleesh@gmail.com>\nLanguage-Team\: Arabic (http\://www.transifex.com/mbanzi/arduino-ide-15/language/ar/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: ar\nPlural-Forms\: nplurals\=6; plural\=n\=\=0 ? 0 \: n\=\=1 ? 1 \: n\=\=2 ? 2 \: n%100>\=3 && n%100<\=10 ? 3 \: n%100>\=11 && n%100<\=99 ? 4 \: 5;\n
1919

2020
#: Preferences.java:358 Preferences.java:374
2121
\ \ (requires\ restart\ of\ Arduino)=(\u064a\u062a\u0637\u0644\u0628 \u0627\u0639\u0627\u062f\u0629 \u062a\u0634\u063a\u064a\u0644 \u0644\u0644\u0623\u0631\u062f\u0648\u064a\u0646\u0648)
@@ -748,10 +748,10 @@ Global\ variables\ use\ {0}\ bytes\ ({2}%%)\ of\ dynamic\ memory,\ leaving\ {3}\
748748
Global\ variables\ use\ {0}\ bytes\ of\ dynamic\ memory.=\u0627\u0644\u0645\u062a\u063a\u064a\u0631\u0627\u062a \u0627\u0644\u0639\u0627\u0645\u0629 \u062a\u0633\u062a\u062e\u062f\u0645 {0} \u0628\u0627\u064a\u062a \u0645\u0646 \u0627\u0644\u0630\u0627\u0643\u0631\u0629 \u0627\u0644\u0645\u062a\u063a\u064a\u0631\u0629.
749749

750750
#: ../../../../../app/src/cc/arduino/view/GoToLineNumber.java:66
751-
!Go\ to\ line=
751+
Go\ to\ line=\u0627\u0630\u0647\u0628 \u0627\u0644\u0649 \u0627\u0644\u0633\u0637\u0631
752752

753753
#: ../../../../../app/src/processing/app/Editor.java:1460
754-
!Go\ to\ line...=
754+
Go\ to\ line...=\u0627\u0630\u0647\u0628 \u0627\u0644\u0649 \u0627\u0644\u0633\u0637\u0631...
755755

756756
#: Preferences.java:98
757757
Greek=Greek
@@ -868,7 +868,7 @@ Library\ can't\ use\ both\ 'src'\ and\ 'utility'\ folders.=\u0627\u0644\u0645\u0
868868
Library\ is\ already\ installed\:\ {0}\ version\ {1}=\u0627\u0644\u0645\u0643\u062a\u0628\u0629 \u0645\u062b\u0628\u062a\u0647 \u0645\u0633\u0628\u0642\u0627\: {0} \u0627\u0635\u062f\u0627\u0631 {1}
869869

870870
#: ../../../../../app/src/cc/arduino/view/GoToLineNumber.java:70
871-
!Line\ number\:=
871+
Line\ number\:=\u0631\u0642\u0645 \u0627\u0644\u0633\u0637\u0631\:
872872

873873
#: Preferences.java:106
874874
Lithuaninan=Lithuaninan
@@ -1655,7 +1655,7 @@ You\ can't\ fool\ me=\u0644\u0627 \u064a\u0645\u0643\u0646\u0643 \u062e\u062f\u0
16551655
You\ can't\ have\ a\ .cpp\ file\ with\ the\ same\ name\ as\ the\ sketch.=\u0644\u0627 \u064a\u0645\u0643\u0646 \u0627\u0646 \u064a\u0643\u0648\u0646 \u0644\u062f\u064a\u0643 \u0645\u0644\u0641 .cpp \u0645\u0639 \u0646\u0641\u0633 \u0627\u0633\u0645 \u0627\u0644\u0634\u064a\u0641\u0631\u0629 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0629
16561656

16571657
#: ../../../../../app/src/processing/app/Base.java:2312
1658-
!You\ can't\ import\ a\ folder\ that\ contains\ your\ sketchbook=
1658+
You\ can't\ import\ a\ folder\ that\ contains\ your\ sketchbook=\u0644\u0627\u064a\u0645\u0643\u0646\u0643 \u0627\u0633\u062a\u064a\u0631\u0627\u062f \u0627\u0644\u0645\u062c\u0644\u062f \u0627\u0644\u0630\u064a \u064a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0634\u064a\u0641\u0631\u062a\u0643 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0629
16591659

16601660
#: Sketch.java:421
16611661
You\ can't\ rename\ the\ sketch\ to\ "{0}"\nbecause\ the\ sketch\ already\ has\ a\ .cpp\ file\ with\ that\ name.=\u0644\u0627 \u064a\u0645\u0643\u0646 \u0627\u0639\u0627\u062f\u0629 \u062a\u0633\u0645\u064a\u0629 \u0627\u0644\u0634\u064a\u0641\u0631\u0629 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0629 \u0644\u0640 "{0}"\n\u0644\u0623\u0646 \u0627\u0644\u0634\u064a\u0641\u0631\u0629 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0629 \u0644\u062f\u064a\u0647 \u0645\u0644\u0641 .cpp \u0645\u0633\u0628\u0642\u0627 \u0628\u0646\u0641\u0633 \u0627\u0644\u0627\u0633\u0645

arduino-core/src/processing/app/i18n/Resources_ca.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ msgstr ""
1818
"Project-Id-Version: Arduino IDE 1.5\n"
1919
"Report-Msgid-Bugs-To: \n"
2020
"POT-Creation-Date: 2012-03-29 10:24-0400\n"
21-
"PO-Revision-Date: 2015-09-30 07:37+0000\n"
22-
"Last-Translator: Federico Fissore <f.fissore@arduino.cc>\n"
21+
"PO-Revision-Date: 2015-10-23 14:35+0000\n"
22+
"Last-Translator: Moritz Werner Casero <moritzwernercasero@gmail.com>\n"
2323
"Language-Team: Catalan (http://www.transifex.com/mbanzi/arduino-ide-15/language/ca/)\n"
2424
"MIME-Version: 1.0\n"
2525
"Content-Type: text/plain; charset=UTF-8\n"
@@ -53,19 +53,19 @@ msgstr "'Mouse' només ho suporta l'Arduino Leonardo"
5353
msgid ""
5454
"'arch' folder is no longer supported! See http://goo.gl/gfFJzU for more "
5555
"information"
56-
msgstr ""
56+
msgstr "La carpeta 'arch' ja no és suporta! Mira http://goo.gl/gfFJzU per saber més informació."
5757

5858
#: Preferences.java:478
5959
msgid "(edit only when Arduino is not running)"
6060
msgstr "(només editar quan l'Arduino no estigui funcionant)"
6161

6262
#: ../../../../../arduino-core/src/cc/arduino/Compiler.java:67
6363
msgid "(legacy)"
64-
msgstr ""
64+
msgstr "(llegat)"
6565

6666
#: ../../../processing/app/helpers/CommandlineParser.java:149
6767
msgid "--curdir no longer supported"
68-
msgstr ""
68+
msgstr "--curdir ja no es suporta."
6969

7070
#: ../../../processing/app/Base.java:468
7171
msgid ""
@@ -125,11 +125,11 @@ msgstr "Una nova versió del software d'Arduino es troba disponible,\nvols visit
125125
#: ../../../../../app/src/cc/arduino/contributions/BuiltInCoreIsNewerCheck.java:96
126126
#, java-format
127127
msgid "A newer {0} package is available"
128-
msgstr ""
128+
msgstr "Un paquet {0} nou esta disponible."
129129

130130
#: ../../../../../app/src/processing/app/Base.java:2307
131131
msgid "A subfolder of your sketchbook is not a valid library"
132-
msgstr ""
132+
msgstr "Una sub-carpeta del teu bloc de programaris no és una llibreria vàlida."
133133

134134
#: Editor.java:1116
135135
msgid "About Arduino"
@@ -163,7 +163,7 @@ msgstr "Albanès"
163163
#: ../../../../../app/src/cc/arduino/contributions/packages/ui/DropdownAllCoresItem.java:43
164164
#: ../../../../../app/src/cc/arduino/view/preferences/Preferences.java:187
165165
msgid "All"
166-
msgstr ""
166+
msgstr "Tot"
167167

168168
#: tools/FixEncoding.java:77
169169
msgid ""

0 commit comments

Comments
 (0)
0