Skip to content

Commit

Permalink
Fix CSV export in some locales; bump version to 1.7.11 (38)
Browse files Browse the repository at this point in the history
  • Loading branch information
iSoron committed Aug 10, 2019
1 parent 64cc9f7 commit 957a5b7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 1.7.11 (Aug 10, 2019)

* Fix bug that produced corrupted CSV files in some countries

### 1.7.10 (June 15, 2019)

* Fix bug that prevented some devices from showing notifications.
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<manifest
package="org.isoron.uhabits"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="37"
android:versionName="1.7.10">
android:versionCode="38"
android:versionName="1.7.11">

<uses-permission android:name="android.permission.VIBRATE"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private void writeHabits() throws IOException
{
String sane = sanitizeFilename(h.getName());
String habitDirName =
String.format("%03d %s", allHabits.indexOf(h) + 1, sane);
String.format(Locale.US, "%03d %s", allHabits.indexOf(h) + 1, sane);
habitDirName = habitDirName.trim() + "/";

new File(exportDirName + habitDirName).mkdirs();
Expand Down Expand Up @@ -202,7 +202,7 @@ private void writeMultipleHabits() throws IOException
checksWriter.write(String.valueOf(checkmarks.get(j)[i]));
checksWriter.write(DELIMITER);
String score =
String.format("%.4f", ((float) scores.get(j)[i]) / Score.MAX_VALUE);
String.format(Locale.US, "%.4f", ((float) scores.get(j)[i]) / Score.MAX_VALUE);
scoresWriter.write(score);
scoresWriter.write(DELIMITER);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/isoron/uhabits/models/ScoreList.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void writeCSV(Writer out) throws IOException
{
String timestamp = dateFormat.format(s.getTimestamp());
String score =
String.format("%.4f", ((float) s.getValue()) / Score.MAX_VALUE);
String.format(Locale.US, "%.4f", ((float) s.getValue()) / Score.MAX_VALUE);
out.write(String.format("%s,%s\n", timestamp, score));
}
}
Expand Down

0 comments on commit 957a5b7

Please sign in to comment.