Compare commits

...

34 Commits

Author SHA1 Message Date
Sylvia van Os
4bf6f6cd5f Release Catima 2.16.3 2022-04-15 18:51:42 +02:00
Sylvia van Os
1872bea0c3 Stocard: Ignore cards with missing card data
Stocard appears to keep images for deleted cards, which causes some
cards to have only images and no data, making them impossible to import.

This is most likely a bug on Stocard's side. As a workaround, we ignore
cards with no data file.
2022-04-14 22:25:46 +02:00
Sylvia van Os
665ef5f712 Merge pull request #864 from CatimaLoyalty/create-pull-request/patch-1649961053
Update Fastlane changelogs
2022-04-14 20:31:52 +02:00
TheLastProject
9fbcb23465 Update Fastlane changelogs 2022-04-14 18:30:52 +00:00
Sylvia van Os
25c35acd6d Import Stocard GS1_128 as CODE_128
GS1_128 seems to be an implementation of CODE_128. ZXING doesn't
explicitly support GS1_128, but CODE_128 should work probably.
2022-04-14 20:30:35 +02:00
Sylvia van Os
35747b7d9f Fix import getting stuck on unexpected exception 2022-04-14 20:20:36 +02:00
Sylvia van Os
eea5cdfdd0 Merge pull request #862 from CatimaLoyalty/create-pull-request/patch-1649567192
Update contributors
2022-04-10 11:16:32 +02:00
TheLastProject
e0c28830ab Update contributors 2022-04-10 05:06:31 +00:00
bors[bot]
e714d98ae6 Merge #860
860: Translations update from Hosted Weblate r=TheLastProject a=weblate

Translations update from [Hosted Weblate](https://hosted.weblate.org) for [Catima/Android](https://hosted.weblate.org/projects/catima/catima/).


It also includes following components:

* [Catima/Android (Fastlane)](https://hosted.weblate.org/projects/catima/fastlane/)



Current translation status:

![Weblate translation status](https://hosted.weblate.org/widgets/catima/-/catima/horizontal-auto.svg)


Co-authored-by: 109247019824 <stoyan@gmx.com>
Co-authored-by: Quentin PAGÈS <quentinantonin@free.fr>
2022-04-08 20:03:02 +00:00
Sylvia van Os
bbfba92de0 Merge pull request #859 from CatimaLoyalty/create-pull-request/patch-1648963016
Update contributors
2022-04-08 22:02:32 +02:00
Quentin PAGÈS
efda8f9f10 Translated using Weblate (Occitan)
Currently translated at 39.5% (96 of 243 strings)

Translation: Catima/Android
Translate-URL: https://hosted.weblate.org/projects/catima/catima/oc/
2022-04-04 09:10:40 +02:00
109247019824
041472b44b Translated using Weblate (Bulgarian)
Currently translated at 4.7% (5 of 105 strings)

Translation: Catima/Android (Fastlane)
Translate-URL: https://hosted.weblate.org/projects/catima/fastlane/bg/
2022-04-04 09:10:40 +02:00
TheLastProject
92f79e9d3e Update contributors 2022-04-03 05:16:56 +00:00
Sylvia van Os
f932d8f6e4 Release Catima 2.16.2 2022-03-31 23:11:03 +02:00
bors[bot]
5e3399cd32 Merge #857
857: Translations update from Hosted Weblate r=TheLastProject a=weblate

Translations update from [Hosted Weblate](https://hosted.weblate.org) for [Catima/Android](https://hosted.weblate.org/projects/catima/catima/).


It also includes following components:

* [Catima/Android (Fastlane)](https://hosted.weblate.org/projects/catima/fastlane/)



Current translation status:

![Weblate translation status](https://hosted.weblate.org/widgets/catima/-/catima/horizontal-auto.svg)


Co-authored-by: 109247019824 <stoyan@gmx.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
2022-03-31 20:57:20 +00:00
Oğuz Ersen
b736f31dc2 Translated using Weblate (Turkish)
Currently translated at 60.0% (63 of 105 strings)

Translation: Catima/Android (Fastlane)
Translate-URL: https://hosted.weblate.org/projects/catima/fastlane/tr/
2022-03-31 22:56:04 +02:00
109247019824
ff285430c0 Translated using Weblate (Bulgarian)
Currently translated at 4.7% (5 of 105 strings)

Translation: Catima/Android (Fastlane)
Translate-URL: https://hosted.weblate.org/projects/catima/fastlane/bg/
2022-03-31 22:56:04 +02:00
bors[bot]
504c1ac516 Merge #855
855: Translations update from Hosted Weblate r=TheLastProject a=weblate

Translations update from [Hosted Weblate](https://hosted.weblate.org) for [Catima/Android](https://hosted.weblate.org/projects/catima/catima/).


It also includes following components:

* [Catima/Android (Fastlane)](https://hosted.weblate.org/projects/catima/fastlane/)



Current translation status:

![Weblate translation status](https://hosted.weblate.org/widgets/catima/-/catima/horizontal-auto.svg)


Co-authored-by: Tony C <kodo60@gmail.com>
2022-03-31 16:12:14 +00:00
Tony C
c4746fe2b9 Translated using Weblate (French)
Currently translated at 19.2% (20 of 104 strings)

Translation: Catima/Android (Fastlane)
Translate-URL: https://hosted.weblate.org/projects/catima/fastlane/fr/
2022-03-31 18:09:35 +02:00
Sylvia van Os
99383d4fc6 Merge branch 'master' of github.com:TheLastProject/loyalty-card-locker 2022-03-30 19:45:18 +02:00
Sylvia van Os
71cd16caac Fix broken colours in Fidme import 2022-03-30 19:45:10 +02:00
Sylvia van Os
6a04077cec Merge pull request #854 from CatimaLoyalty/create-pull-request/patch-1648585831
Update Fastlane changelogs
2022-03-29 22:31:42 +02:00
TheLastProject
5664ff5631 Update Fastlane changelogs 2022-03-29 20:30:30 +00:00
Sylvia van Os
48764e266e Update CHANGELOG 2022-03-29 22:29:55 +02:00
Sylvia van Os
435cfd2839 Merge pull request #853 from weblate/weblate-catima-catima
Translations update from Hosted Weblate
2022-03-29 22:20:08 +02:00
Sylvia van Os
34639f2a2e Don't render text sequences as single character 2022-03-29 22:19:12 +02:00
Joel A
ce9c3bffe6 Translated using Weblate (Swedish)
Currently translated at 1.9% (2 of 104 strings)

Translation: Catima/Android (Fastlane)
Translate-URL: https://hosted.weblate.org/projects/catima/fastlane/sv/
2022-03-29 21:09:59 +02:00
Sylvia van Os
d0d15393f6 Merge pull request #850 from CatimaLoyalty/create-pull-request/patch-1648357620
Update contributors
2022-03-27 11:11:27 +02:00
TheLastProject
e9eaf51e40 Update contributors 2022-03-27 05:07:00 +00:00
bors[bot]
de8a843414 Merge #849
849: Translations update from Hosted Weblate r=TheLastProject a=weblate

Translations update from [Hosted Weblate](https://hosted.weblate.org) for [Catima/Android](https://hosted.weblate.org/projects/catima/catima/).


It also includes following components:

* [Catima/Android (Fastlane)](https://hosted.weblate.org/projects/catima/fastlane/)



Current translation status:

![Weblate translation status](https://hosted.weblate.org/widgets/catima/-/catima/horizontal-auto.svg)


Co-authored-by: Altons <marsupilami450@gmail.com>
2022-03-26 21:35:52 +00:00
Altons
0ad4c683b7 Translated using Weblate (German)
Currently translated at 6.7% (7 of 104 strings)

Translation: Catima/Android (Fastlane)
Translate-URL: https://hosted.weblate.org/projects/catima/fastlane/de/
2022-03-26 22:09:45 +01:00
Altons
fdbff0f942 Translated using Weblate (French)
Currently translated at 18.2% (19 of 104 strings)

Translation: Catima/Android (Fastlane)
Translate-URL: https://hosted.weblate.org/projects/catima/fastlane/fr/
2022-03-26 22:09:45 +01:00
Sylvia van Os
a02d9fd995 Merge pull request #846 from CatimaLoyalty/dependabot/gradle/androidx.core-core-splashscreen-1.0.0-beta02
Bump core-splashscreen from 1.0.0-beta01 to 1.0.0-beta02
2022-03-25 21:51:52 +01:00
dependabot[bot]
f98203fc5d Bump core-splashscreen from 1.0.0-beta01 to 1.0.0-beta02
Bumps core-splashscreen from 1.0.0-beta01 to 1.0.0-beta02.

---
updated-dependencies:
- dependency-name: androidx.core:core-splashscreen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 02:26:52 +00:00
19 changed files with 58 additions and 19 deletions

View File

@@ -1,5 +1,13 @@
# Changelog
## v2.16.3 - 107 (2022-04-15)
- Stocard import fixes
## v2.16.2 - 106 (2022-03-31)
- Fix some character sequences being shown as a single character
## v2.16.1 - 105 (2022-03-25)
- Fix gray block appearing on invalid value for barcode

View File

@@ -18,8 +18,8 @@ android {
applicationId "me.hackerchick.catima"
minSdkVersion 21
targetSdkVersion 31
versionCode 105
versionName "2.16.1"
versionCode 107
versionName "2.16.3"
vectorDrawables.useSupportLibrary true
multiDexEnabled true
@@ -90,7 +90,7 @@ dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
// Splash Screen
implementation 'androidx.core:core-splashscreen:1.0.0-beta01'
implementation 'androidx.core:core-splashscreen:1.0.0-beta02'
// Third-party
implementation 'com.journeyapps:zxing-android-embedded:4.3.0@aar'

View File

@@ -73,9 +73,10 @@ class LetterBitmap {
String firstChar = displayName.substring(0, 1).toUpperCase();
int firstCharEnd = 2;
while (firstCharEnd <= displayName.length()) {
// test for the longest render-able string
// Test for the longest render-able string
// But ignore containing only a-Z0-9 to not render things like ffi as a single character
String test = displayName.substring(0, firstCharEnd);
if (PaintCompat.hasGlyph(paint, test)) {
if (!isAlphabetical(test) && PaintCompat.hasGlyph(paint, test)) {
firstChar = test;
}
firstCharEnd++;
@@ -124,6 +125,10 @@ class LetterBitmap {
return colors.getColor(color, Color.BLACK);
}
private static boolean isAlphabetical(String string) {
return string.matches("[a-zA-Z0-9]*");
}
/**
* Determine the color which the letter tile will use if no default
* color is provided.

View File

@@ -21,6 +21,7 @@ import java.text.ParseException;
import protect.card_locker.CatimaBarcode;
import protect.card_locker.DBHelper;
import protect.card_locker.FormatException;
import protect.card_locker.Utils;
/**
* Class for importing a database from CSV (Comma Separate Values)
@@ -56,7 +57,7 @@ public class FidmeImporter implements Importer {
try {
for (CSVRecord record : fidmeParser) {
importLoyaltyCard(database, record);
importLoyaltyCard(context, database, record);
if (Thread.currentThread().isInterrupted()) {
throw new InterruptedException();
@@ -75,7 +76,7 @@ public class FidmeImporter implements Importer {
* Import a single loyalty card into the database using the given
* session.
*/
private void importLoyaltyCard(SQLiteDatabase database, CSVRecord record)
private void importLoyaltyCard(Context context, SQLiteDatabase database, CSVRecord record)
throws FormatException {
// A loyalty card export from Fidme contains the following fields:
// Retailer (store name)
@@ -117,11 +118,12 @@ public class FidmeImporter implements Importer {
// TODO: Hook this into our own loyalty card DB if we ever get one
CatimaBarcode barcodeType = null;
// No favourite data in the export either
// No favourite data or colour in the export either
int starStatus = 0;
int headerColor = Utils.getRandomHeaderColor(context);
// TODO: Front and back image
DBHelper.insertLoyaltyCard(database, store, note, null, BigDecimal.valueOf(0), null, cardId, null, barcodeType, null, starStatus, null);
DBHelper.insertLoyaltyCard(database, store, note, null, BigDecimal.valueOf(0), null, cardId, null, barcodeType, headerColor, starStatus, null);
}
}

View File

@@ -55,7 +55,7 @@ public class MultiFormatImporter {
return new ImportExportResult(ImportExportResultType.Success);
} catch (ZipException e) {
return new ImportExportResult(ImportExportResultType.BadPassword);
} catch (IOException | FormatException | InterruptedException | JSONException | ParseException | NullPointerException e) {
} catch (Exception e) {
Log.e(TAG, "Failed to import data", e);
error = e.toString();
} finally {

View File

@@ -3,6 +3,7 @@ package protect.card_locker.importexport;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Bitmap;
import android.util.Log;
import com.google.zxing.BarcodeFormat;
@@ -39,6 +40,8 @@ import protect.card_locker.ZipUtils;
* A header is expected for the each table showing the names of the columns.
*/
public class StocardImporter implements Importer {
private static final String TAG = "Catima";
public void importData(Context context, SQLiteDatabase database, InputStream input, char[] password) throws IOException, FormatException, JSONException, ParseException {
HashMap<String, HashMap<String, Object>> loyaltyCardHashMap = new HashMap<>();
HashMap<String, HashMap<String, Object>> providers = new HashMap<>();
@@ -201,6 +204,12 @@ public class StocardImporter implements Importer {
for (HashMap<String, Object> loyaltyCardData : loyaltyCardHashMap.values()) {
String providerId = (String) loyaltyCardData.get("_providerId");
if (providerId == null) {
Log.d(TAG, "Missing providerId for card " + loyaltyCardData + ", ignoring...");
continue;
}
HashMap<String, Object> providerData = providers.get(providerId);
String store = providerData != null ? providerData.get("name").toString() : providerId;
@@ -211,6 +220,8 @@ public class StocardImporter implements Importer {
if (barcodeTypeString != null && !barcodeTypeString.isEmpty()) {
if (barcodeTypeString.equals("RSS_DATABAR_EXPANDED")) {
barcodeType = CatimaBarcode.fromBarcode(BarcodeFormat.RSS_EXPANDED);
} else if (barcodeTypeString.equals("GS1_128")) {
barcodeType = CatimaBarcode.fromBarcode(BarcodeFormat.CODE_128);
} else {
barcodeType = CatimaBarcode.fromName(barcodeTypeString);
}

View File

@@ -7,10 +7,10 @@ solokot
Katharine Chui
mondstern
Oğuz Ersen
IllusiveMan196
Altonss
Petr Novák
IllusiveMan196
StoyanDimitrov
Petr Novák
Joel A
Taco
Gediminas Murauskas
@@ -23,12 +23,12 @@ Sergio Paredes
huuhaa
laralem
arshbeerSingh
Quentin PAGÈS
Miha Frangež
sr093906
mdvhimself
Maciej Błędkowski
Olivia (Zoe)
Quentin PAGÈS
betsythefc
Silvério Santos
waffshappen
@@ -83,10 +83,11 @@ Ronak Upadhyay
Rose Liverman
Simone Dotto
Subhashish Anand
darkodo
Tymofii Lytvynenko
Tjipke van der Heide
Yevgeny M
avikkundu
Avik Kundu
opsik
psa-jforestier
Robin

View File

@@ -66,4 +66,6 @@
<string name="groups">Grops</string>
<string name="groupsList">Grops: <xliff:g>%s</xliff:g></string>
<string name="settings_max_font_size_scale">Talha max. de la poliça</string>
<string name="settings_theme_color">Color del tèma</string>
<string name="settings_locale">Lenga</string>
</resources>

View File

@@ -0,0 +1 @@
- Нов дизайн с Material You

View File

@@ -1 +1 @@
За щрихкодове, членства, програми за лоялност, талони и билети.
За щрихкодове, карти за членства и лоялност, талони и билети.

View File

@@ -1 +1 @@
Catima
Catima портфейл за карти

View File

@@ -0,0 +1,2 @@
- Grauer Block bei ungültigem Wert für Barcode behoben
- Korrekturen beim Stocard-Import

View File

@@ -0,0 +1 @@
- Fix some character sequences being shown as a single character

View File

@@ -0,0 +1 @@
- Stocard import fixes

View File

@@ -0,0 +1,2 @@
- Plusieurs corrections mineures
- Correction des plantages en langue norvégienne

View File

@@ -0,0 +1,2 @@
- Correction du bloc gris apparaissant sur une valeur invalide pour un code-barres
- Corrections pour l'importation de Stocard

View File

@@ -1,4 +1,4 @@
- Est désormais officiellement compatible avec ces codes-barres à une et deux dimensions :
- Est désormais officiellement compatible avec les codes-barres à une et deux dimensions suivants :
- AZTEC
- CODABAR
- CODE_39
@@ -11,4 +11,4 @@
- QR_CODE
- UPC_A
- Les codes-barres sont maintenant affichés plus grand, afin d'en faciliter la lecture.
- Les codes-barres sont maintenant affichés plus grand, afin d'en faciliter la lecture

View File

@@ -1 +1 @@
Catima — Kundklubbs plånboken
Catima — Kundklubbsplånboken

View File

@@ -0,0 +1 @@
- Bazı karakter dizilerinin tek karakter olarak gösterilmesi düzeltildi