correct versions in release notes

This commit is contained in:
Sergey Solovyev 2013-07-18 17:53:44 +04:00
parent 17b034c1c9
commit 1fda7d619e
4 changed files with 69 additions and 11 deletions

View File

@ -15,8 +15,8 @@ Wenn die Anwendung Ihnen gefäll\nbewerten Sie es bitte mit 5 Sterne auf\n
Diese Anwendung nutzt folgende Open-Source-Bibliotheken:\n Diese Anwendung nutzt folgende Open-Source-Bibliotheken:\n
<a href="http://simple.sourceforge.net">Simple (XML Serialization)</a>\n <a href="http://simple.sourceforge.net">Simple (XML Serialization)</a>\n
<a href="http://meditorworld.appspot.com/meditor.txt">JSCL</a></string> <a href="http://meditorworld.appspot.com/meditor.txt">JSCL</a></string>
<string name="cpp_translators_text">Dieser App wird ins Deutsche von E.Bazhenova übersetzt</string> <string name="cpp_translators_text">Dieser App wird ins Deutsche von folgenden Personen übersetzt: </string>
<string name="cpp_translators_list"></string> <string name="cpp_translators_list">E.Bazhenova</string>
<string name="c_release_notes">Release Notizen</string> <string name="c_release_notes">Release Notizen</string>
<string name="c_release_notes_for_title">"Release Notes für Version "</string> <string name="c_release_notes_for_title">"Release Notes für Version "</string>
<string name="cpp_share_link">http://www.facebook.com/calculatorpp</string> <string name="cpp_share_link">http://www.facebook.com/calculatorpp</string>

View File

@ -19,7 +19,7 @@
<string name="c_down">Nach unten</string> <string name="c_down">Nach unten</string>
<string name="c_up">Nach oben</string> <string name="c_up">Nach oben</string>
<string name="c_restart">Neustart</string> <string name="c_restart">Neustart</string>
<string name="c_undo">rückgängigmachen</string> <string name="c_undo">aufheben</string>
<string name="c_redo">wiederholen</string> <string name="c_redo">wiederholen</string>
<string name="c_clear">C</string> <string name="c_clear">C</string>
<string name="c_erase"></string> <string name="c_erase"></string>

View File

@ -22,6 +22,7 @@
<resources> <resources>
<string name="c_release_notes_for_4_version" translatable="false">1.1.4</string>
<string name="c_release_notes_for_4"> <string name="c_release_notes_for_4">
1. Haptic feedback\n 1. Haptic feedback\n
2. Two layouts: calculator and cellphone\n 2. Two layouts: calculator and cellphone\n
@ -29,12 +30,14 @@
4. ERROR message is not so often now 4. ERROR message is not so often now
</string> </string>
<string name="c_release_notes_for_5_version" translatable="false">1.1.5</string>
<string name="c_release_notes_for_5"> <string name="c_release_notes_for_5">
1. Screen with all functions\n 1. Screen with all functions\n
2. Added support for decimal logarithm, factorial, comparison functions\n 2. Added support for decimal logarithm, factorial, comparison functions\n
3. Haptic feedback duration preference 3. Haptic feedback duration preference
</string> </string>
<string name="c_release_notes_for_6_version" translatable="false">1.1.6</string>
<string name="c_release_notes_for_6"> <string name="c_release_notes_for_6">
1. Saving constants in two clicks (use +π button)\n 1. Saving constants in two clicks (use +π button)\n
2. Result size is auto adjusted to fill all spare space\n 2. Result size is auto adjusted to fill all spare space\n
@ -43,6 +46,7 @@
5. Degrees added (use °: e.g. 30° and result will be converted into radians) 5. Degrees added (use °: e.g. 30° and result will be converted into radians)
</string> </string>
<string name="c_release_notes_for_7_version" translatable="false">1.1.7</string>
<string name="c_release_notes_for_7"> <string name="c_release_notes_for_7">
1. Support for entering numbers in scientific notation (2.3E2)\n 1. Support for entering numbers in scientific notation (2.3E2)\n
2. Added functions: deg(), rad() to convert from radians to degrees and vice versa\n 2. Added functions: deg(), rad() to convert from radians to degrees and vice versa\n
@ -53,11 +57,13 @@
6. Fixed bug with displaying result 6. Fixed bug with displaying result
</string> </string>
<string name="c_release_notes_for_8_version" translatable="false">1.1.8</string>
<string name="c_release_notes_for_8"> <string name="c_release_notes_for_8">
1. Fixed bug with i^3\n 1. Fixed bug with i^3\n
2. Fixed crash in case of many brackets 2. Fixed crash in case of many brackets
</string> </string>
<string name="c_release_notes_for_9_version" translatable="false">1.1.9</string>
<string name="c_release_notes_for_9" formatted="false"> <string name="c_release_notes_for_9" formatted="false">
1. Percentage calculations.\n 1. Percentage calculations.\n
Examples:\n Examples:\n
@ -70,6 +76,7 @@
100+50%^2=2600, but 100+50^2%=101.08 100+50%^2=2600, but 100+50^2%=101.08
</string> </string>
<string name="c_release_notes_for_12_version" translatable="false">1.1.12</string>
<string name="c_release_notes_for_12"> <string name="c_release_notes_for_12">
1. Help screen added\n 1. Help screen added\n
2. Support for differentiation, integration, calculation of sum and product.\n 2. Support for differentiation, integration, calculation of sum and product.\n
@ -81,11 +88,13 @@
∫ab(x, x, 0, 10)=50.0 ∫ab(x, x, 0, 10)=50.0
</string> </string>
<string name="c_release_notes_for_13_version" translatable="false">1.1.13</string>
<string name="c_release_notes_for_13"> <string name="c_release_notes_for_13">
1. Fixed crashes\n 1. Fixed crashes\n
2. Added variables on the main screen 2. Added variables on the main screen
</string> </string>
<string name="c_release_notes_for_14_version" translatable="false">1.1.14</string>
<string name="c_release_notes_for_14"> <string name="c_release_notes_for_14">
1. Support for different angle units: radians, degrees, gradians, turns\n 1. Support for different angle units: radians, degrees, gradians, turns\n
2. Easy toggling between radians and degrees: use the toggle switch located on the 6 button\n 2. Easy toggling between radians and degrees: use the toggle switch located on the 6 button\n
@ -93,12 +102,14 @@
4. Fixed bug with simplification of √(π^2) 4. Fixed bug with simplification of √(π^2)
</string> </string>
<string name="c_release_notes_for_15_version" translatable="false">1.1.15</string>
<string name="c_release_notes_for_15"> <string name="c_release_notes_for_15">
1. Added functions\' plotting: type expression which contains 1 undefined variable (e.g. cos(t)) and click on 1. Added functions\' plotting: type expression which contains 1 undefined variable (e.g. cos(t)) and click on
the result. In the context menu choose \'Plot graph\'. Supported features: zoom in/out, moving graph, plotting the result. In the context menu choose \'Plot graph\'. Supported features: zoom in/out, moving graph, plotting
imaginary part imaginary part
</string> </string>
<string name="c_release_notes_for_16_version" translatable="false">1.1.16</string>
<string name="c_release_notes_for_16"> <string name="c_release_notes_for_16">
1. Buttons swipe preference\n 1. Buttons swipe preference\n
2. Added support for different numeral bases (currently supported: dec, bin, oct). Dec and bin can be chosen 2. Added support for different numeral bases (currently supported: dec, bin, oct). Dec and bin can be chosen
@ -107,6 +118,7 @@
4. Performance improvements in functions\' plotting 4. Performance improvements in functions\' plotting
</string> </string>
<string name="c_release_notes_for_20_version" translatable="false">1.2.20</string>
<string name="c_release_notes_for_20"> <string name="c_release_notes_for_20">
1. New swipe actions (left, right)\n 1. New swipe actions (left, right)\n
2. Extended history: save, remove, copy, use from history screen (use long click for additional actions)\n 2. Extended history: save, remove, copy, use from history screen (use long click for additional actions)\n
@ -117,6 +129,7 @@
6. Bug fixes: correct double factorial calculation, 20x fix, e^(pi*i)+1 fix and others 6. Bug fixes: correct double factorial calculation, 20x fix, e^(pi*i)+1 fix and others
</string> </string>
<string name="c_release_notes_for_21_version" translatable="false">1.2.21</string>
<string name="c_release_notes_for_21"> <string name="c_release_notes_for_21">
1. Release notes screen added\n 1. Release notes screen added\n
2. Added categories in functions and constants screens\n 2. Added categories in functions and constants screens\n
@ -127,17 +140,20 @@
6. Variant of π constant independent from angle units 6. Variant of π constant independent from angle units
</string> </string>
<string name="c_release_notes_for_22_version" translatable="false">1.2.22</string>
<string name="c_release_notes_for_22"> <string name="c_release_notes_for_22">
1. Fix for missing cursor in Android 3 and higher\n 1. Fix for missing cursor in Android 3 and higher\n
2. Fix for substituting 3.14... with Π constant 2. Fix for substituting 3.14... with Π constant
</string> </string>
<string name="c_release_notes_for_23_version" translatable="false">1.2.23</string>
<string name="c_release_notes_for_23"> <string name="c_release_notes_for_23">
1. Fix for calculating inverse trigonometric functions in complex field\n 1. Fix for calculating inverse trigonometric functions in complex field\n
2. Removed time delay for calculation\n 2. Removed time delay for calculation\n
3. Fix the problem with 200 - 10% = π 3. Fix the problem with 200 - 10% = π
</string> </string>
<string name="c_release_notes_for_24_version" translatable="false">1.2.24</string>
<string name="c_release_notes_for_24"> <string name="c_release_notes_for_24">
Note from developer\n\n Note from developer\n\n
Sorry to inform you but this version of application brings built-in ads.\n Sorry to inform you but this version of application brings built-in ads.\n
@ -153,6 +169,7 @@
or help to translate the application to your native language. or help to translate the application to your native language.
</string> </string>
<string name="c_release_notes_for_25_version" translatable="false">1.2.25</string>
<string name="c_release_notes_for_25"> <string name="c_release_notes_for_25">
1. Integration of ln() and lg()\n 1. Integration of ln() and lg()\n
2. Last opened tab is remembered now (history, variables etc)\n 2. Last opened tab is remembered now (history, variables etc)\n
@ -162,6 +179,7 @@
6. Double zero (00) key 6. Double zero (00) key
</string> </string>
<string name="c_release_notes_for_26_version" translatable="false">1.2.26</string>
<string name="c_release_notes_for_26"> <string name="c_release_notes_for_26">
1. Integration of trigonometric functions is disabled for not radian angles\n 1. Integration of trigonometric functions is disabled for not radian angles\n
2. Bug with 1/0 = -1/0 fixed\n 2. Bug with 1/0 = -1/0 fixed\n
@ -169,6 +187,7 @@
4. Other small fixes 4. Other small fixes
</string> </string>
<string name="c_release_notes_for_27_version" translatable="false">1.2.27</string>
<string name="c_release_notes_for_27"> <string name="c_release_notes_for_27">
Note from developer:\n\n Note from developer:\n\n
I\'m glad to inform you that I\'ve started a forum for Calculator++: http://facebook.com/calculatorpp.\n I\'m glad to inform you that I\'ve started a forum for Calculator++: http://facebook.com/calculatorpp.\n
@ -182,6 +201,7 @@
5. Other small fixes 5. Other small fixes
</string> </string>
<string name="c_release_notes_for_29_version" translatable="false">1.2.28</string>
<string name="c_release_notes_for_29"> <string name="c_release_notes_for_29">
1. New Metro theme with 3 color variations (old themes are still available)\n 1. New Metro theme with 3 color variations (old themes are still available)\n
2. Simple layout (Default layout is still scientific)\n 2. Simple layout (Default layout is still scientific)\n
@ -195,6 +215,7 @@
10. Billing problems fixes 10. Billing problems fixes
</string> </string>
<string name="c_release_notes_for_34_version" translatable="false">1.2.31</string>
<string name="c_release_notes_for_34"> <string name="c_release_notes_for_34">
1. Ukrainian localization (Андрій Бандура)\n 1. Ukrainian localization (Андрій Бандура)\n
2. HEX digits are not shown in not HEX mode\n 2. HEX digits are not shown in not HEX mode\n
@ -207,12 +228,14 @@
9. Wrong lg() integration and differentiation fixed 9. Wrong lg() integration and differentiation fixed
</string> </string>
<string name="c_release_notes_for_39_version" translatable="false">1.2.34</string>
<string name="c_release_notes_for_39"> <string name="c_release_notes_for_39">
1. Virtual keyboard are now not shown on Android 4 ICS\n 1. Virtual keyboard are now not shown on Android 4 ICS\n
2. Fast number conversion from display context menu\n 2. Fast number conversion from display context menu\n
3. Minor GUI fixes 3. Minor GUI fixes
</string> </string>
<string name="c_release_notes_for_93_version" translatable="false">1.4.0</string>
<string name="c_release_notes_for_93"> <string name="c_release_notes_for_93">
1. We are now on Facebook: facebook.com/calculatorpp\n 1. We are now on Facebook: facebook.com/calculatorpp\n
2. Tablet support (new awesome UI)\n 2. Tablet support (new awesome UI)\n
@ -223,17 +246,20 @@
7. Chinese translations 7. Chinese translations
</string> </string>
<string name="c_release_notes_for_99_version" translatable="false">1.4.1</string>
<string name="c_release_notes_for_99"> <string name="c_release_notes_for_99">
1. UI improvements for 4-7 inches displays\n 1. UI improvements for 4-7 inches displays\n
2. Ans variable (last calculated value) 2. Ans variable (last calculated value)
</string> </string>
<string name="c_release_notes_for_103_version" translatable="false">1.4.2</string>
<string name="c_release_notes_for_103"> <string name="c_release_notes_for_103">
1. Calculator++ widget for home screen (works only if app installed in phone memory)\n 1. Calculator++ widget for home screen (works only if app installed in phone memory)\n
2. Mobile phone layout for tablets (Preferences->Appearance Preferences->Layout->Scientific (Mobile))\n 2. Mobile phone layout for tablets (Preferences->Appearance Preferences->Layout->Scientific (Mobile))\n
3. Manual calculations (Preferences->Calculations Preferences->Result is calculated…) 3. Manual calculations (Preferences->Calculations Preferences->Result is calculated…)
</string> </string>
<string name="c_release_notes_for_107_version" translatable="false">1.4.4</string>
<string name="c_release_notes_for_107"> <string name="c_release_notes_for_107">
1. Support for user-defined functions (see +f button or + button inside functions screen)\n 1. Support for user-defined functions (see +f button or + button inside functions screen)\n
2. Widget in different sizes: 3x3, 3x4, 4x4, 4x5\n 2. Widget in different sizes: 3x3, 3x4, 4x4, 4x5\n
@ -244,17 +270,20 @@
7. Bug fixes 7. Bug fixes
</string> </string>
<string name="c_release_notes_for_111_version" translatable="false">1.5.1</string>
<string name="c_release_notes_for_111"> <string name="c_release_notes_for_111">
1. Calculator in separate window\n 1. Calculator in separate window\n
2. UI is fixed for some devices 2. UI is fixed for some devices
</string> </string>
<string name="c_release_notes_for_112_version" translatable="false">1.5.2</string>
<string name="c_release_notes_for_112"> <string name="c_release_notes_for_112">
1. Possibility to remove icon for Calculator++ in separate window\n 1. Possibility to remove icon for Calculator++ in separate window\n
2. Fixed some crashes (editing, plotting)\n 2. Fixed some crashes (editing, plotting)\n
3. Fixed flicker for Calculator++ in separate window 3. Fixed flicker for Calculator++ in separate window
</string> </string>
<string name="c_release_notes_for_115_version" translatable="false">1.6.2</string>
<string name="c_release_notes_for_115"> <string name="c_release_notes_for_115">
1. Graph plotter completely reworked\n 1. Graph plotter completely reworked\n
2. Added support for graphing several functions\n 2. Added support for graphing several functions\n
@ -264,4 +293,14 @@
6. Other fixes 6. Other fixes
</string> </string>
<string name="c_release_notes_for_118_version" translatable="false">2.0.0</string>
<string name="c_release_notes_for_118">
1. German and Polish translations\n
2. Wizard\n
3. Graph improvements\n
4. Asin(i) problem fix\n
5. Greek letters for variable names\n
6. Other fixes
</string>
</resources> </resources>

View File

@ -28,16 +28,16 @@ import android.text.Html;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
import javax.annotation.Nonnull;
import org.solovyev.android.Android;
import org.solovyev.android.calculator.CalculatorApplication; import org.solovyev.android.calculator.CalculatorApplication;
import org.solovyev.android.calculator.CalculatorFragment; import org.solovyev.android.calculator.CalculatorFragment;
import org.solovyev.android.calculator.CalculatorFragmentType; import org.solovyev.android.calculator.CalculatorFragmentType;
import org.solovyev.android.calculator.R; import org.solovyev.android.calculator.R;
import org.solovyev.common.text.Strings; import org.solovyev.common.text.Strings;
import javax.annotation.Nonnull;
import static org.solovyev.android.Android.getAppVersionCode;
/** /**
* User: serso * User: serso
* Date: 12/25/11 * Date: 12/25/11
@ -69,13 +69,14 @@ public class CalculatorReleaseNotesFragment extends CalculatorFragment {
final StringBuilder result = new StringBuilder(); final StringBuilder result = new StringBuilder();
final String releaseNotesForTitle = context.getString(R.string.c_release_notes_for_title); final String releaseNotesForTitle = context.getString(R.string.c_release_notes_for_title);
final int version = Android.getAppVersionCode(context); final int currentVersionCode = getAppVersionCode(context);
final TextHelper textHelper = new TextHelper(context.getResources(), CalculatorApplication.class.getPackage().getName()); final TextHelper textHelper = new TextHelper(context.getResources(), CalculatorApplication.class.getPackage().getName());
boolean first = true; boolean first = true;
for (int i = version; i >= minVersion; i--) { for (int versionCode = currentVersionCode; versionCode >= minVersion; versionCode--) {
String releaseNotesForVersion = textHelper.getText("c_release_notes_for_" + i); final String versionName = getVersionName(textHelper, versionCode);
String releaseNotesForVersion = textHelper.getText(makeReleaseNotesResourceId(versionCode));
if (!Strings.isEmpty(releaseNotesForVersion)) { if (!Strings.isEmpty(releaseNotesForVersion)) {
assert releaseNotesForVersion != null; assert releaseNotesForVersion != null;
if (!first) { if (!first) {
@ -84,11 +85,29 @@ public class CalculatorReleaseNotesFragment extends CalculatorFragment {
first = false; first = false;
} }
releaseNotesForVersion = releaseNotesForVersion.replace("\n", "<br/>"); releaseNotesForVersion = releaseNotesForVersion.replace("\n", "<br/>");
result.append("<b>").append(releaseNotesForTitle).append(i).append("</b><br/><br/>"); result.append("<b>").append(releaseNotesForTitle).append(versionName).append("</b><br/><br/>");
result.append(releaseNotesForVersion); result.append(releaseNotesForVersion);
} }
} }
return result.toString(); return result.toString();
} }
@Nonnull
private static String getVersionName(@Nonnull TextHelper textHelper, int versionCode) {
final String versionName = textHelper.getText(makeVersionResourceId(versionCode));
if (versionName != null) {
return versionName;
} else {
return String.valueOf(versionCode);
}
}
private static String makeReleaseNotesResourceId(int versionCode) {
return "c_release_notes_for_" + versionCode;
}
private static String makeVersionResourceId(int versionCode) {
return "c_release_notes_for_" + versionCode + "_version";
}
} }