mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2025-12-25 08:07:56 -05:00
Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8c022dc70 | ||
|
|
d823ddd8aa | ||
|
|
352b42bba0 | ||
|
|
89894131d9 | ||
|
|
5ddcb0a668 | ||
|
|
13257d17fc | ||
|
|
5e8a589d9a | ||
|
|
44711043b9 | ||
|
|
80ee8aa860 | ||
|
|
cd6685b974 | ||
|
|
b5f464000b | ||
|
|
27159323d5 | ||
|
|
9551ce8a8b | ||
|
|
525471f749 | ||
|
|
57bedd0300 | ||
|
|
c3345a1a15 | ||
|
|
15f6bd86a1 | ||
|
|
e2ad1c9da2 | ||
|
|
7082669612 | ||
|
|
d595d24769 | ||
|
|
4287d66f6f | ||
|
|
311361d105 | ||
|
|
4a88e39deb | ||
|
|
4511590263 | ||
|
|
d0c30ffa1c | ||
|
|
813c2bff85 | ||
|
|
0c3cf43841 | ||
|
|
6c651f7e3e | ||
|
|
ef7fc92920 | ||
|
|
ccaf70c749 | ||
|
|
2299bf9d86 | ||
|
|
b65f8f32ca | ||
|
|
47695d3a72 | ||
|
|
439c660b2e | ||
|
|
4293d7d4b2 | ||
|
|
e368e66b8a | ||
|
|
992a7f9e84 | ||
|
|
ecf0faf00a | ||
|
|
64178f3fd1 | ||
|
|
dab6588800 | ||
|
|
f71bb32592 | ||
|
|
0c44212d92 | ||
|
|
ce149c91e9 |
15
CHANGELOG.md
15
CHANGELOG.md
@@ -1,5 +1,20 @@
|
||||
# Changelog
|
||||
|
||||
## v2.2.2 (2021-08-08)
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix crash on rotation in loyalty card edit activity
|
||||
|
||||
## v2.2.1 (2021-08-07)
|
||||
|
||||
Changes:
|
||||
|
||||
- Improve Stocard importer
|
||||
- Fix importing Catima export with multiline note
|
||||
- Scale card title in acceptable range
|
||||
- Animation improvements
|
||||
|
||||
## v2.2.0 (2021-08-02)
|
||||
|
||||
Changes:
|
||||
|
||||
@@ -18,8 +18,8 @@ android {
|
||||
applicationId "me.hackerchick.catima"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 30
|
||||
versionCode 76
|
||||
versionName "2.2.0"
|
||||
versionCode 78
|
||||
versionName "2.2.2"
|
||||
|
||||
vectorDrawables.useSupportLibrary true
|
||||
multiDexEnabled true
|
||||
|
||||
@@ -15,18 +15,26 @@ import protect.card_locker.preferences.Settings;
|
||||
class GroupCursorAdapter extends BaseCursorAdapter<GroupCursorAdapter.GroupListItemViewHolder>
|
||||
{
|
||||
Settings mSettings;
|
||||
private final Cursor mCursor;
|
||||
private Cursor mCursor;
|
||||
private final Context mContext;
|
||||
private final GroupCursorAdapter.GroupAdapterListener mListener;
|
||||
DBHelper mDb;
|
||||
|
||||
public GroupCursorAdapter(Context inputContext, Cursor inputCursor, GroupCursorAdapter.GroupAdapterListener inputListener) {
|
||||
super(inputCursor);
|
||||
setHasStableIds(true);
|
||||
mSettings = new Settings(inputContext);
|
||||
mCursor = inputCursor;
|
||||
mContext = inputContext;
|
||||
mListener = inputListener;
|
||||
mDb = new DBHelper(inputContext);
|
||||
|
||||
swapCursor(mCursor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void swapCursor(Cursor inputCursor) {
|
||||
super.swapCursor(inputCursor);
|
||||
mCursor = inputCursor;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package protect.card_locker;
|
||||
|
||||
import android.database.Cursor;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
@@ -10,7 +12,7 @@ import java.util.Date;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class LoyaltyCard {
|
||||
public class LoyaltyCard implements Parcelable {
|
||||
public final int id;
|
||||
public final String store;
|
||||
public final String note;
|
||||
@@ -22,6 +24,7 @@ public class LoyaltyCard {
|
||||
@Nullable
|
||||
public final String barcodeId;
|
||||
|
||||
@Nullable
|
||||
public final BarcodeFormat barcodeType;
|
||||
|
||||
@Nullable
|
||||
@@ -31,7 +34,7 @@ public class LoyaltyCard {
|
||||
|
||||
public LoyaltyCard(final int id, final String store, final String note, final Date expiry,
|
||||
final BigDecimal balance, final Currency balanceType, final String cardId,
|
||||
final String barcodeId, final BarcodeFormat barcodeType, final Integer headerColor,
|
||||
@Nullable final String barcodeId, @Nullable final BarcodeFormat barcodeType, @Nullable final Integer headerColor,
|
||||
final int starStatus)
|
||||
{
|
||||
this.id = id;
|
||||
@@ -47,6 +50,38 @@ public class LoyaltyCard {
|
||||
this.starStatus = starStatus;
|
||||
}
|
||||
|
||||
protected LoyaltyCard(Parcel in) {
|
||||
id = in.readInt();
|
||||
store = in.readString();
|
||||
note = in.readString();
|
||||
long tmpExpiry = in.readLong();
|
||||
expiry = tmpExpiry != -1 ? new Date(tmpExpiry) : null;
|
||||
balance = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
balanceType = (Currency) in.readValue(Currency.class.getClassLoader());
|
||||
cardId = in.readString();
|
||||
barcodeId = in.readString();
|
||||
String tmpBarcodeType = in.readString();
|
||||
barcodeType = !tmpBarcodeType.isEmpty() ? BarcodeFormat.valueOf(tmpBarcodeType) : null;
|
||||
int tmpHeaderColor = in.readInt();
|
||||
headerColor = tmpHeaderColor != -1 ? tmpHeaderColor : null;
|
||||
starStatus = in.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeInt(id);
|
||||
parcel.writeString(store);
|
||||
parcel.writeString(note);
|
||||
parcel.writeLong(expiry != null ? expiry.getTime() : -1);
|
||||
parcel.writeValue(balance);
|
||||
parcel.writeValue(balanceType);
|
||||
parcel.writeString(cardId);
|
||||
parcel.writeString(barcodeId);
|
||||
parcel.writeString(barcodeType != null ? barcodeType.toString() : "");
|
||||
parcel.writeInt(headerColor != null ? headerColor : -1);
|
||||
parcel.writeInt(starStatus);
|
||||
}
|
||||
|
||||
public static LoyaltyCard toLoyaltyCard(Cursor cursor)
|
||||
{
|
||||
int id = cursor.getInt(cursor.getColumnIndexOrThrow(DBHelper.LoyaltyCardDbIds.ID));
|
||||
@@ -89,4 +124,21 @@ public class LoyaltyCard {
|
||||
|
||||
return new LoyaltyCard(id, store, note, expiry, balance, balanceType, cardId, barcodeId, barcodeType, headerColor, starred);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public static final Creator<LoyaltyCard> CREATOR = new Creator<LoyaltyCard>() {
|
||||
@Override
|
||||
public LoyaltyCard createFromParcel(Parcel in) {
|
||||
return new LoyaltyCard(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoyaltyCard[] newArray(int size) {
|
||||
return new LoyaltyCard[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -39,14 +39,22 @@ public class LoyaltyCardCursorAdapter extends BaseCursorAdapter<LoyaltyCardCurso
|
||||
public LoyaltyCardCursorAdapter(Context inputContext, Cursor inputCursor, CardAdapterListener inputListener)
|
||||
{
|
||||
super(inputCursor);
|
||||
setHasStableIds(true);
|
||||
mSettings = new Settings(inputContext);
|
||||
mCursor = inputCursor;
|
||||
mContext = inputContext;
|
||||
mListener = inputListener;
|
||||
mSelectedItems = new SparseBooleanArray();
|
||||
mAnimationItemsIndex = new SparseBooleanArray();
|
||||
|
||||
mDarkModeEnabled = MainActivity.isDarkModeEnabled(inputContext);
|
||||
|
||||
swapCursor(mCursor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void swapCursor(Cursor inputCursor) {
|
||||
super.swapCursor(inputCursor);
|
||||
mCursor = inputCursor;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -78,6 +78,7 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
private static final String TAG = "Catima";
|
||||
|
||||
private final String STATE_TAB_INDEX = "savedTab";
|
||||
private final String STATE_TEMP_CARD = "tempLoyaltyCard";
|
||||
|
||||
private static final int ID_IMAGE_FRONT = 0;
|
||||
private static final int ID_IMAGE_BACK = 1;
|
||||
@@ -185,10 +186,12 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
super.onSaveInstanceState(savedInstanceState);
|
||||
tabs = findViewById(R.id.tabs);
|
||||
savedInstanceState.putInt(STATE_TAB_INDEX, tabs.getSelectedTabPosition());
|
||||
savedInstanceState.putParcelable(STATE_TEMP_CARD, tempLoyaltyCard);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
|
||||
tempLoyaltyCard = savedInstanceState.getParcelable(STATE_TEMP_CARD);
|
||||
super.onRestoreInstanceState(savedInstanceState);
|
||||
tabs = findViewById(R.id.tabs);
|
||||
tabs.selectTab(tabs.getTabAt(savedInstanceState.getInt(STATE_TAB_INDEX)));
|
||||
|
||||
@@ -41,6 +41,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.constraintlayout.widget.Guideline;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
@@ -64,7 +65,7 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
|
||||
TextView groupsView;
|
||||
TextView balanceView;
|
||||
TextView expiryView;
|
||||
TextView storeName;
|
||||
AppCompatTextView storeName;
|
||||
ImageButton maximizeButton;
|
||||
ImageView barcodeImage;
|
||||
ImageButton minimizeButton;
|
||||
@@ -429,6 +430,12 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
|
||||
|
||||
storeName.setText(loyaltyCard.store);
|
||||
storeName.setTextSize(settings.getFontSizeMax(settings.getLargeFont()));
|
||||
TextViewCompat.setAutoSizeTextTypeUniformWithConfiguration(
|
||||
storeName,
|
||||
settings.getFontSizeMin(settings.getLargeFont()),
|
||||
settings.getFontSizeMax(settings.getLargeFont()),
|
||||
1,
|
||||
TypedValue.COMPLEX_UNIT_DIP);
|
||||
|
||||
int backgroundHeaderColor;
|
||||
if(loyaltyCard.headerColor != null)
|
||||
|
||||
@@ -16,7 +16,6 @@ import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
@@ -47,6 +46,8 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
protected String mFilter = "";
|
||||
protected int selectedTab = 0;
|
||||
private RecyclerView mCardList;
|
||||
private View mHelpText;
|
||||
private View mNoMatchingCardsText;
|
||||
|
||||
private ActionMode.Callback mCurrentActionModeCallback = new ActionMode.Callback()
|
||||
{
|
||||
@@ -180,8 +181,6 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
updateLoyaltyCardList(mFilter, null);
|
||||
|
||||
TabLayout groupsTabLayout = findViewById(R.id.groups);
|
||||
groupsTabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
||||
@Override
|
||||
@@ -218,13 +217,24 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
}
|
||||
};
|
||||
|
||||
final View helpText = findViewById(R.id.helpText);
|
||||
final View noMatchingCardsText = findViewById(R.id.noMatchingCardsText);
|
||||
final View list = findViewById(R.id.list);
|
||||
mHelpText = findViewById(R.id.helpText);
|
||||
mNoMatchingCardsText = findViewById(R.id.noMatchingCardsText);
|
||||
mCardList = findViewById(R.id.list);
|
||||
|
||||
helpText.setOnTouchListener(gestureTouchListener);
|
||||
noMatchingCardsText.setOnTouchListener(gestureTouchListener);
|
||||
list.setOnTouchListener(gestureTouchListener);
|
||||
mHelpText.setOnTouchListener(gestureTouchListener);
|
||||
mNoMatchingCardsText.setOnTouchListener(gestureTouchListener);
|
||||
mCardList.setOnTouchListener(gestureTouchListener);
|
||||
|
||||
// Init card list
|
||||
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
|
||||
mCardList.setLayoutManager(mLayoutManager);
|
||||
mCardList.setItemAnimator(new DefaultItemAnimator());
|
||||
|
||||
mAdapter = new LoyaltyCardCursorAdapter(this, null, this);
|
||||
mCardList.setAdapter(mAdapter);
|
||||
registerForContextMenu(mCardList);
|
||||
|
||||
updateLoyaltyCardList(mFilter, null);
|
||||
|
||||
/*
|
||||
* This was added for Huawei, but Huawei is just too much of a fucking pain.
|
||||
@@ -384,20 +394,7 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
group = (Group) tag;
|
||||
}
|
||||
|
||||
mCardList = findViewById(R.id.list);
|
||||
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
|
||||
mCardList.setLayoutManager(mLayoutManager);
|
||||
mCardList.setItemAnimator(new DefaultItemAnimator());
|
||||
|
||||
final TextView helpText = findViewById(R.id.helpText);
|
||||
final TextView noMatchingCardsText = findViewById(R.id.noMatchingCardsText);
|
||||
|
||||
Cursor cardCursor = mDB.getLoyaltyCardCursor(filterText, group);
|
||||
|
||||
mAdapter = new LoyaltyCardCursorAdapter(this, cardCursor, this);
|
||||
mCardList.setAdapter(mAdapter);
|
||||
|
||||
registerForContextMenu(mCardList);
|
||||
mAdapter.swapCursor(mDB.getLoyaltyCardCursor(filterText, group));
|
||||
|
||||
if(mDB.getLoyaltyCardCount() > 0)
|
||||
{
|
||||
@@ -405,21 +402,21 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
// to ensure that the noMatchingCardsText doesn't end up being shown below
|
||||
// the keyboard
|
||||
mCardList.setVisibility(View.VISIBLE);
|
||||
helpText.setVisibility(View.GONE);
|
||||
mHelpText.setVisibility(View.GONE);
|
||||
if(mAdapter.getItemCount() > 0)
|
||||
{
|
||||
noMatchingCardsText.setVisibility(View.GONE);
|
||||
mNoMatchingCardsText.setVisibility(View.GONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
noMatchingCardsText.setVisibility(View.VISIBLE);
|
||||
mNoMatchingCardsText.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mCardList.setVisibility(View.GONE);
|
||||
helpText.setVisibility(View.VISIBLE);
|
||||
noMatchingCardsText.setVisibility(View.GONE);
|
||||
mHelpText.setVisibility(View.VISIBLE);
|
||||
mNoMatchingCardsText.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (mCurrentActionMode != null) {
|
||||
@@ -682,7 +679,6 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
@Override
|
||||
public void onRowClicked(int inputPosition)
|
||||
{
|
||||
|
||||
if (mAdapter.getSelectedItemCount() > 0)
|
||||
{
|
||||
enableActionMode(inputPosition);
|
||||
|
||||
@@ -28,6 +28,8 @@ public class ManageGroupsActivity extends AppCompatActivity implements GroupCurs
|
||||
private static final String TAG = "Catima";
|
||||
|
||||
private final DBHelper mDb = new DBHelper(this);
|
||||
private TextView mHelpText;
|
||||
private RecyclerView mGroupList;
|
||||
GroupCursorAdapter mAdapter;
|
||||
|
||||
@Override
|
||||
@@ -42,19 +44,28 @@ public class ManageGroupsActivity extends AppCompatActivity implements GroupCurs
|
||||
{
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
updateGroupList();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
updateGroupList();
|
||||
|
||||
FloatingActionButton addButton = findViewById(R.id.fabAdd);
|
||||
addButton.setOnClickListener(v -> createGroup());
|
||||
addButton.bringToFront();
|
||||
|
||||
mGroupList = findViewById(R.id.list);
|
||||
mHelpText = findViewById(R.id.helpText);
|
||||
|
||||
// Init group list
|
||||
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
|
||||
mGroupList.setLayoutManager(mLayoutManager);
|
||||
mGroupList.setItemAnimator(new DefaultItemAnimator());
|
||||
|
||||
mAdapter = new GroupCursorAdapter(this, null, this);
|
||||
mGroupList.setAdapter(mAdapter);
|
||||
|
||||
updateGroupList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,29 +75,17 @@ public class ManageGroupsActivity extends AppCompatActivity implements GroupCurs
|
||||
|
||||
private void updateGroupList()
|
||||
{
|
||||
final RecyclerView groupList = findViewById(R.id.list);
|
||||
final TextView helpText = findViewById(R.id.helpText);
|
||||
mAdapter.swapCursor(mDb.getGroupCursor());
|
||||
|
||||
if (mDb.getGroupCount() == 0) {
|
||||
groupList.setVisibility(View.GONE);
|
||||
helpText.setVisibility(View.VISIBLE);
|
||||
mGroupList.setVisibility(View.GONE);
|
||||
mHelpText.setVisibility(View.VISIBLE);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
groupList.setVisibility(View.VISIBLE);
|
||||
helpText.setVisibility(View.GONE);
|
||||
|
||||
Cursor groupCursor = mDb.getGroupCursor();
|
||||
|
||||
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
|
||||
groupList.setLayoutManager(mLayoutManager);
|
||||
groupList.setItemAnimator(new DefaultItemAnimator());
|
||||
|
||||
mAdapter = new GroupCursorAdapter(this, groupCursor, this);
|
||||
groupList.setAdapter(mAdapter);
|
||||
|
||||
registerForContextMenu(groupList);
|
||||
mGroupList.setVisibility(View.VISIBLE);
|
||||
mHelpText.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void invalidateHomescreenActiveTab()
|
||||
@@ -160,7 +159,7 @@ public class ManageGroupsActivity extends AppCompatActivity implements GroupCurs
|
||||
mDb.reorderGroups(groups);
|
||||
|
||||
// Update UI
|
||||
mAdapter.notifyItemMoved(currentIndex, newIndex);
|
||||
updateGroupList();
|
||||
|
||||
// Ordering may have changed, so invalidate
|
||||
invalidateHomescreenActiveTab();
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.io.InputStreamReader;
|
||||
import java.io.StringReader;
|
||||
import java.math.BigDecimal;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Currency;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -142,18 +143,36 @@ public class CatimaImporter implements Importer
|
||||
String tmp = input.readLine();
|
||||
|
||||
if (tmp == null || tmp.isEmpty()) {
|
||||
boolean sectionParsed = false;
|
||||
|
||||
switch (part) {
|
||||
case 0:
|
||||
// This is the version info, ignore
|
||||
sectionParsed = true;
|
||||
break;
|
||||
case 1:
|
||||
parseV2Groups(db, database, stringPart);
|
||||
try {
|
||||
parseV2Groups(db, database, stringPart);
|
||||
sectionParsed = true;
|
||||
} catch (FormatException e) {
|
||||
// We may have a multiline field, try again
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
parseV2Cards(context, db, database, stringPart);
|
||||
try {
|
||||
parseV2Cards(context, db, database, stringPart);
|
||||
sectionParsed = true;
|
||||
} catch (FormatException e) {
|
||||
// We may have a multiline field, try again
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
parseV2CardGroups(db, database, stringPart);
|
||||
try {
|
||||
parseV2CardGroups(db, database, stringPart);
|
||||
sectionParsed = true;
|
||||
} catch (FormatException e) {
|
||||
// We may have a multiline field, try again
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new FormatException("Issue parsing CSV data, too many parts for v2 parsing");
|
||||
@@ -163,8 +182,12 @@ public class CatimaImporter implements Importer
|
||||
break;
|
||||
}
|
||||
|
||||
part += 1;
|
||||
stringPart = "";
|
||||
if (sectionParsed) {
|
||||
part += 1;
|
||||
stringPart = "";
|
||||
} else {
|
||||
stringPart += tmp + "\n";
|
||||
}
|
||||
} else {
|
||||
stringPart += tmp + "\n";
|
||||
}
|
||||
@@ -183,9 +206,11 @@ public class CatimaImporter implements Importer
|
||||
// Parse groups
|
||||
final CSVParser groupParser = new CSVParser(new StringReader(data), CSVFormat.RFC4180.withHeader());
|
||||
|
||||
List<CSVRecord> records = new ArrayList<>();
|
||||
|
||||
try {
|
||||
for (CSVRecord record : groupParser) {
|
||||
importGroup(database, db, record);
|
||||
records.add(record);
|
||||
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
throw new InterruptedException();
|
||||
@@ -196,6 +221,10 @@ public class CatimaImporter implements Importer
|
||||
} finally {
|
||||
groupParser.close();
|
||||
}
|
||||
|
||||
for (CSVRecord record : records) {
|
||||
importGroup(database, db, record);
|
||||
}
|
||||
}
|
||||
|
||||
public void parseV2Cards(Context context, DBHelper db, SQLiteDatabase database, String data) throws IOException, FormatException, InterruptedException
|
||||
@@ -203,9 +232,11 @@ public class CatimaImporter implements Importer
|
||||
// Parse cards
|
||||
final CSVParser cardParser = new CSVParser(new StringReader(data), CSVFormat.RFC4180.withHeader());
|
||||
|
||||
List<CSVRecord> records = new ArrayList<>();
|
||||
|
||||
try {
|
||||
for (CSVRecord record : cardParser) {
|
||||
importLoyaltyCard(context, database, db, record);
|
||||
records.add(record);
|
||||
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
throw new InterruptedException();
|
||||
@@ -216,6 +247,10 @@ public class CatimaImporter implements Importer
|
||||
} finally {
|
||||
cardParser.close();
|
||||
}
|
||||
|
||||
for (CSVRecord record : records) {
|
||||
importLoyaltyCard(context, database, db, record);
|
||||
}
|
||||
}
|
||||
|
||||
public void parseV2CardGroups(DBHelper db, SQLiteDatabase database, String data) throws IOException, FormatException, InterruptedException
|
||||
@@ -223,9 +258,11 @@ public class CatimaImporter implements Importer
|
||||
// Parse card group mappings
|
||||
final CSVParser cardGroupParser = new CSVParser(new StringReader(data), CSVFormat.RFC4180.withHeader());
|
||||
|
||||
List<CSVRecord> records = new ArrayList<>();
|
||||
|
||||
try {
|
||||
for (CSVRecord record : cardGroupParser) {
|
||||
importCardGroupMapping(database, db, record);
|
||||
records.add(record);
|
||||
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
throw new InterruptedException();
|
||||
@@ -236,6 +273,10 @@ public class CatimaImporter implements Importer
|
||||
} finally {
|
||||
cardGroupParser.close();
|
||||
}
|
||||
|
||||
for (CSVRecord record : records) {
|
||||
importCardGroupMapping(database, db, record);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,20 +9,23 @@ import com.google.zxing.BarcodeFormat;
|
||||
import net.lingala.zip4j.io.inputstream.ZipInputStream;
|
||||
import net.lingala.zip4j.model.LocalFileHeader;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.apache.commons.csv.CSVFormat;
|
||||
import org.apache.commons.csv.CSVParser;
|
||||
import org.apache.commons.csv.CSVRecord;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.math.BigDecimal;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import protect.card_locker.DBHelper;
|
||||
import protect.card_locker.FormatException;
|
||||
import protect.card_locker.R;
|
||||
import protect.card_locker.Utils;
|
||||
import protect.card_locker.ZipUtils;
|
||||
|
||||
@@ -37,7 +40,25 @@ public class StocardImporter implements Importer
|
||||
{
|
||||
public void importData(Context context, DBHelper db, InputStream input, char[] password) throws IOException, FormatException, JSONException, ParseException {
|
||||
HashMap<String, HashMap<String, Object>> loyaltyCardHashMap = new HashMap<>();
|
||||
HashMap<String, String> providers = new HashMap<>();
|
||||
HashMap<String, HashMap<String, String>> providers = new HashMap<>();
|
||||
|
||||
final CSVParser parser = new CSVParser(new InputStreamReader(context.getResources().openRawResource(R.raw.stocard_stores), StandardCharsets.UTF_8), CSVFormat.RFC4180.withHeader());
|
||||
|
||||
try
|
||||
{
|
||||
for (CSVRecord record : parser)
|
||||
{
|
||||
HashMap<String, String> recordData = new HashMap<>();
|
||||
recordData.put("name", record.get("name"));
|
||||
recordData.put("barcodeFormat", record.get("barcodeFormat"));
|
||||
|
||||
providers.put(record.get("_id"), recordData);
|
||||
}
|
||||
|
||||
parser.close();
|
||||
} catch(IllegalArgumentException|IllegalStateException e) {
|
||||
throw new FormatException("Issue parsing CSV data", e);
|
||||
}
|
||||
|
||||
ZipInputStream zipInputStream = new ZipInputStream(input, password);
|
||||
|
||||
@@ -68,9 +89,7 @@ public class StocardImporter implements Importer
|
||||
};
|
||||
}
|
||||
|
||||
if (startsWith(nameParts, providersFileName, 0) && !localFileHeader.isDirectory()) {
|
||||
providers = parseProviders(zipInputStream);
|
||||
} else if (startsWith(nameParts, cardBaseName, 1)) {
|
||||
if (startsWith(nameParts, cardBaseName, 1)) {
|
||||
// Extract cardName
|
||||
cardName = nameParts[cardBaseName.length].split("\\.", 2)[0];
|
||||
|
||||
@@ -139,10 +158,13 @@ public class StocardImporter implements Importer
|
||||
database.beginTransaction();
|
||||
|
||||
for (HashMap<String, Object> loyaltyCardData : loyaltyCardHashMap.values()) {
|
||||
String store = providers.get(loyaltyCardData.get("_providerId").toString());
|
||||
String providerId = (String) loyaltyCardData.get("_providerId");
|
||||
HashMap<String, String> providerData = providers.get(providerId);
|
||||
|
||||
String store = providerData != null ? providerData.get("name") : providerId;
|
||||
String note = (String) Utils.hashmapGetOrDefault(loyaltyCardData, "note", "");
|
||||
String cardId = (String) loyaltyCardData.get("cardId");
|
||||
String barcodeTypeString = (String) Utils.hashmapGetOrDefault(loyaltyCardData, "barcodeType", null);
|
||||
String barcodeTypeString = (String) Utils.hashmapGetOrDefault(loyaltyCardData, "barcodeType", providerData != null ? providerData.get("barcodeFormat") : null);
|
||||
BarcodeFormat barcodeType = null;
|
||||
if (barcodeTypeString != null) {
|
||||
if (barcodeTypeString.equals("RSS_DATABAR_EXPANDED")) {
|
||||
@@ -194,33 +216,4 @@ public class StocardImporter implements Importer
|
||||
|
||||
return loyaltyCardHashMap;
|
||||
}
|
||||
|
||||
private HashMap<String, String> parseProviders(ZipInputStream zipInputStream) throws IOException, JSONException {
|
||||
// FIXME: This is probably completely wrong, but it works for the one and only test file I have
|
||||
JSONObject jsonObject = ZipUtils.readJSON(zipInputStream);
|
||||
|
||||
JSONArray providerIdList = jsonObject.getJSONArray("provider_id_list");
|
||||
JSONArray providerList = jsonObject.getJSONArray("provider_list");
|
||||
|
||||
// Resort, put IDs with - in them after IDs without any -
|
||||
List<String> providerIds = new ArrayList<>();
|
||||
List<String> customProviderIds = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < providerIdList.length(); i++) {
|
||||
String providerId = providerIdList.get(i).toString();
|
||||
if (providerId.contains("-")) {
|
||||
customProviderIds.add(providerId);
|
||||
} else {
|
||||
providerIds.add(providerId);
|
||||
}
|
||||
}
|
||||
providerIds.addAll(customProviderIds);
|
||||
|
||||
HashMap<String, String> providers = new HashMap<>();
|
||||
for (int i = 0; i < jsonObject.getInt("number_of_cards"); i++) {
|
||||
providers.put(providerIds.get(i), providerList.get(i).toString());
|
||||
}
|
||||
|
||||
return providers;
|
||||
}
|
||||
}
|
||||
@@ -275,7 +275,7 @@
|
||||
app:expandedTitleMarginEnd="64dp"
|
||||
app:contentScrim="?colorPrimary"
|
||||
app:expandedTitleGravity="top">
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/storeName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
7
app/src/main/res/raw/readme.md
Normal file
7
app/src/main/res/raw/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# stocard_stores.csv
|
||||
|
||||
stocard_stores.csv was created by extracting /data/data/de.stocard/de.stocard.stocard/databases/stores on a rooted devices and running the following command over it:
|
||||
|
||||
sqlite3 -header -csv stores "select _id,name,barcodeFormat from stores" > stocard_stores.csv
|
||||
|
||||
Only used for data portability reasons (ensuring importing works). Do NOT copy this anywhere else or use it for any purpose other than ensuring we can import a GDPR-provided export. We want to make sure this stays under fair use.
|
||||
4249
app/src/main/res/raw/stocard_stores.csv
Normal file
4249
app/src/main/res/raw/stocard_stores.csv
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,8 @@
|
||||
<resources
|
||||
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="action_add">Přidat</string>
|
||||
|
||||
<string name="noGiftCards">ZAtím némáte žádné věrnostní karty. Klikněte na tlačítko "+" (plus) nahoře a začněte.\n\nLoyalty Card Locker umožňuje nosit své věrnostní karty v telefonu, takže jsou vždy na dosah.</string>
|
||||
<string name="storeName">Obchod</string>
|
||||
<string name="noGiftCards">Klepnutím na tlačítko + plus přidáte kartu nebo ji nejprve importujete z nabídky⋮.</string>
|
||||
<string name="storeName">Název</string>
|
||||
<string name="note">Poznámka</string>
|
||||
<string name="cardId">ID karty</string>
|
||||
<string name="cancel">Zrušit</string>
|
||||
@@ -14,42 +12,64 @@
|
||||
<string name="confirm">Potvrdit</string>
|
||||
<string name="ok">Ano</string>
|
||||
<string name="copy_to_clipboard">Kopírovat ID do schránky</string>
|
||||
<string name="sendLabel">Odeslat…</string>
|
||||
<string name="sendLabel">Odeslat…</string>
|
||||
<string name="editCardTitle">Editovat věrnostní kartu</string>
|
||||
<string name="addCardTitle">Přidat věrnostní kartu</string>
|
||||
<string name="scanCardBarcode">Oskenujte kód karty</string>
|
||||
<string name="barcodeImageDescription">Obrázek kódu karty</string>
|
||||
|
||||
<string name="noStoreError">Nebyl zadán Obchod</string>
|
||||
<string name="noCardIdError">Nebylo zadáno ID karty</string>
|
||||
<string name="scanCardBarcode">Skenování Čárový Kód Karty</string>
|
||||
<string name="barcodeImageDescription">Obrázek čárového kódu karty</string>
|
||||
<string name="noStoreError">Zadáno žádné jméno</string>
|
||||
<string name="noCardIdError">Žádné ID karty zadáno</string>
|
||||
<string name="importExport">Import/Export</string>
|
||||
<string name="exportName">Export</string>
|
||||
<string name="importExportHelp">Zálohování dat vám umožní přesunout vaše uložené karty na jiné zařízení.</string>
|
||||
<string name="importSuccessfulTitle">Import proběhl úspěšně</string>
|
||||
<string name="importExportHelp">Zálohování karet vám umožní přesunout je do jiného zařízení.</string>
|
||||
<string name="importSuccessfulTitle">Dovážit</string>
|
||||
<string name="importFailedTitle">Import selhal</string>
|
||||
<string name="importFailed">Import selhal</string>
|
||||
<string name="exportSuccessfulTitle">Export proběhl úspěšně</string>
|
||||
<string name="importFailed">Nelze importovat karty</string>
|
||||
<string name="exportSuccessfulTitle">Exportovat</string>
|
||||
<string name="exportFailedTitle">Export selhal</string>
|
||||
<string name="exportFailed">Export selhal</string>
|
||||
<string name="importing">Importuji…</string>
|
||||
<string name="exporting">Exportuji…</string>
|
||||
<string name="noExternalStoragePermissionError">Nelze importovat nebo exportovat karty bez přístupu k externímu uložišti</string>
|
||||
<string name="exportFailed">Nelze exportovat karty</string>
|
||||
<string name="importing">Importuji…</string>
|
||||
<string name="exporting">Exportuji…</string>
|
||||
<string name="noExternalStoragePermissionError">Udělit povolení externího úložiště pro import nebo export karet jako první</string>
|
||||
<string name="importOptionFilesystemTitle">Import ze souborového systému</string>
|
||||
<string name="importOptionFilesystemExplanation">Vyberte konkrétní soubor v uložišti.</string>
|
||||
<string name="importOptionFilesystemButton">Ze souborového systému</string>
|
||||
<string name="importOptionApplicationTitle">Použít externí aplikaci</string>
|
||||
<string name="importOptionApplicationExplanation">K otevření souboru použije externí aplikaci jako Dropbox, Google Drive, nebo vámi preferovaný prohlížeč souborů.</string>
|
||||
<string name="importOptionApplicationButton">Použít externí aplikaci</string>
|
||||
|
||||
<string name="importOptionApplicationTitle">Použijte jinou aplikaci</string>
|
||||
<string name="importOptionApplicationExplanation">K otevření souboru použijte libovolnou aplikaci nebo svého oblíbeného správce souborů.</string>
|
||||
<string name="importOptionApplicationButton">Použijte jinou aplikaci</string>
|
||||
<string name="about">O aplikaci</string>
|
||||
<string name="app_license">Licensed under the GPLv3.</string>
|
||||
<string name="app_license">Copylefted libre software, licencovaný GPLv3+.</string>
|
||||
<string name="about_title_fmt">O aplikaci <xliff:g id="app_name">%s</xliff:g></string>
|
||||
<string name="debug_version_fmt">Verze: <xliff:g id="version">%s</xliff:g></string>
|
||||
<string name="app_revision_fmt">Revizní informace: <xliff:g id="app_revision_url">%s</xliff:g></string>
|
||||
<string name="app_revision_fmt">Informace o revizi: <xliff:g id="app_revision_url">%s</xliff:g></string>
|
||||
<string name="selectBarcodeTitle">Vyberte čárový kód</string>
|
||||
<string name="copy_to_clipboard_toast">ID karty zkopírováno do schránky</string>
|
||||
|
||||
<string name="deleteTitle">Odstzranit věrnostní kartu</string>
|
||||
<string name="copy_to_clipboard_toast">ID karty zkopírované do schránky</string>
|
||||
<string name="deleteTitle">Smazat kartu</string>
|
||||
<string name="deleteConfirmation">Opravdu chcete smazat tuto věrnostní kartu?</string>
|
||||
|
||||
</resources>
|
||||
<string name="moveBarcodeToCenterOfScreen">Střed čárového kódu na obrazovce</string>
|
||||
<string name="moveBarcodeToTopOfScreen">Přesuňte čárový kód do horní části obrazovky</string>
|
||||
<string name="chooseExpiryDate">Zvolte datum vypršení platnosti</string>
|
||||
<string name="never">Nikdy</string>
|
||||
<string name="expiryDate">Platnost</string>
|
||||
<string name="editBarcode">Upravit čárový kód</string>
|
||||
<string name="barcode">Kód</string>
|
||||
<string name="app_resources">Zdroje třetích stran Libre: <xliff:g id="app_resources_list">%s</xliff:g></string>
|
||||
<string name="app_libraries">Libre knihovny třetích stran: <xliff:g id="app_libraries_list">%s</xliff:g></string>
|
||||
<string name="app_copyright_old">Na základě Loyalty Card Keychain
|
||||
\ncopyright © 2016–2020 Branden Archer.</string>
|
||||
<string name="exportOptionExplanation">Data budou zapsána na místo podle vašeho výběru.</string>
|
||||
<string name="failedParsingImportUriError">Nelze analyzovat import URI</string>
|
||||
<string name="noCardExistsError">Nelze najít kartu</string>
|
||||
<string name="noCardsMessage">Nejprve přidejte kartu</string>
|
||||
<string name="cardShortcut">Zástupce Karty</string>
|
||||
<string name="share">Podíl</string>
|
||||
<string name="unlockScreen">Odblokovat Rotaci</string>
|
||||
<string name="lockScreen">Otáčení Bloku</string>
|
||||
<string name="unstar">Odebrat z oblíbených</string>
|
||||
<string name="star">Přidat do oblíbených</string>
|
||||
<string name="noBarcode">Žádný čárový kód</string>
|
||||
<string name="barcodeNoBarcode">Tato karta nemá čárový kód</string>
|
||||
<string name="barcodeType">Typ čárového kódu</string>
|
||||
<string name="noMatchingGiftCards">Nic jsem nenašel. Zkuste změnit vyhledávání.</string>
|
||||
<string name="action_search">Vyhledávání</string>
|
||||
</resources>
|
||||
39
app/src/main/res/values-da/strings.xml
Normal file
39
app/src/main/res/values-da/strings.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="scanCardBarcode">Scanne kortets stregkode</string>
|
||||
<string name="addCardTitle">Tilføj kort</string>
|
||||
<string name="editCardTitle">Rediger kort</string>
|
||||
<string name="sendLabel">Afsend…</string>
|
||||
<string name="share">Aktie</string>
|
||||
<string name="copy_to_clipboard">Kopier ID til udklipsholder</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="deleteConfirmation">Slete dette kort permanent\?</string>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Streichen <xliff:g>%d</xliff:g> kort</item>
|
||||
<item quantity="other">Streichen <xliff:g>%d</xliff:g> korts</item>
|
||||
</plurals>
|
||||
<string name="deleteTitle">Karte streichen</string>
|
||||
<string name="unlockScreen">Afbloker rotation</string>
|
||||
<string name="lockScreen">Blokrotation</string>
|
||||
<string name="confirm">Bekræft</string>
|
||||
<string name="delete">Slet</string>
|
||||
<string name="edit">Rediger</string>
|
||||
<string name="save">Gem</string>
|
||||
<string name="cancel">Annuller</string>
|
||||
<string name="unstar">Fjern fra favoritter</string>
|
||||
<string name="star">Føj til favoritter</string>
|
||||
<string name="noBarcode">Ingen stregkode</string>
|
||||
<string name="barcodeNoBarcode">Dette kort har ingen stregkode</string>
|
||||
<string name="barcodeType">Stregkode type</string>
|
||||
<string name="cardId">Kort ID</string>
|
||||
<string name="note">Bemærk</string>
|
||||
<string name="storeName">Navn</string>
|
||||
<string name="noMatchingGiftCards">Jeg fandt ikke noget. Prøv at ændre din søgning.</string>
|
||||
<string name="noGiftCards">Klik på + plus-knappen for at tilføje et kort, eller importer først nogle kort fra ⋮-menuen.</string>
|
||||
<plurals name="selectedCardCount">
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> valgt kort</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> valgte kort</item>
|
||||
</plurals>
|
||||
<string name="action_add">Tilføj</string>
|
||||
<string name="action_search">Søg</string>
|
||||
</resources>
|
||||
@@ -155,7 +155,7 @@
|
||||
<string name="frontImageDescription">Bild der Kartenvorderseite</string>
|
||||
<string name="backImageDescription">Bild der Kartenrückseite</string>
|
||||
<string name="passwordRequired">Bitte geben Sie das Passwort ein</string>
|
||||
<string name="importStocardMessage">Wählen Sie Ihren <i>***-sync.zip</i>-Export aus Stocard zum Importieren aus, und wählen Sie anschließend die Strichcodetypen manuell aus.
|
||||
<string name="importStocardMessage">Wählen Sie Ihren <i>***-sync.zip</i>-Export aus Stocard zum Importieren aus.
|
||||
\nOder Sie erhalten ihn, indem Sie eine E-Mail an support@stocardapp.com senden und um einen Export Ihrer Daten bitten.</string>
|
||||
<string name="importStocard">Von Stocard importieren</string>
|
||||
<string name="turn_flashlight_off">Taschenlampe ausschalten</string>
|
||||
@@ -172,7 +172,7 @@
|
||||
<item quantity="other">Diese <xliff:g>%d</xliff:g> Karten endgültig löschen\?</item>
|
||||
</plurals>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Karte löschen</item>
|
||||
<item quantity="other">Karten löschen</item>
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> Karte löschen</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> Karten löschen</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -165,14 +165,14 @@
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> tarjeta seleccionada</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> tarjetas seleccionadas</item>
|
||||
</plurals>
|
||||
<string name="deleteTitle">Eliminar tarjeta</string>
|
||||
<string name="deleteTitle">Eliminar la tarjeta</string>
|
||||
<string name="deleteConfirmation">¿Quiere eliminar esta tarjeta\?</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">¿Borrar esta tarjeta <xliff:g>%d</xliff:g> permanentemente\?</item>
|
||||
<item quantity="other">¿Borrar estas tarjetas <xliff:g>%d</xliff:g> permanentemente\?</item>
|
||||
</plurals>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Borrar la tarjeta</item>
|
||||
<item quantity="other">Borrar las tarjetas</item>
|
||||
<item quantity="one">Borrar <xliff:g>%d</xliff:g> tarjeta</item>
|
||||
<item quantity="other">Borrar <xliff:g>%d</xliff:g> tarjetas</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -155,7 +155,7 @@
|
||||
<string name="backImageDescription">Image verso de la carte</string>
|
||||
<string name="frontImageDescription">Image recto de la carte</string>
|
||||
<string name="passwordRequired">Veuillez entrer le mot de passe</string>
|
||||
<string name="importStocardMessage">Sélectionnez votre exportation <i>***-sync.zip</i> de Stocard pour l’importer, et sélectionnez les types de codes-barres manuellement par la suite.
|
||||
<string name="importStocardMessage">Sélectionnez votre exportation <i>***-sync.zip</i> de Stocard pour l’importer.
|
||||
\nVous pouvez aussi l’obtenir en envoyant un courriel à support@stocardapp.com pour demander une exportation de vos données.</string>
|
||||
<string name="importStocard">Importer depuis Stocard</string>
|
||||
<string name="turn_flashlight_off">Éteindre la lampe de poche</string>
|
||||
@@ -165,10 +165,14 @@
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> carte sélectionnée</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> cartes sélectionnées</item>
|
||||
</plurals>
|
||||
<string name="deleteTitle">Supprimer la carte de fidélité</string>
|
||||
<string name="deleteTitle">Supprimer la carte</string>
|
||||
<string name="deleteConfirmation">Supprimer cette carte \?</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">Supprimer cette <xliff:g>%d</xliff:g> carte définitivement \?</item>
|
||||
<item quantity="other">Supprimer ces <xliff:g>%d</xliff:g> cartes définitivement \?</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Supprimer <xliff:g>%d</xliff:g> carte</item>
|
||||
<item quantity="other">Supprimer <xliff:g>%d</xliff:g> cartes</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -41,9 +41,9 @@
|
||||
<string name="importing">Importazione in corso…</string>
|
||||
<string name="exporting">Esportazione in corso…</string>
|
||||
<string name="noExternalStoragePermissionError">Concedi l\'autorizzazione all\'archiviazione esterna per importare o esportare prima le carte</string>
|
||||
<string name="importOptionFilesystemTitle">Importa dal file system</string>
|
||||
<string name="importOptionFilesystemExplanation">Scegli un file dal file system.</string>
|
||||
<string name="importOptionFilesystemButton">Dal file system</string>
|
||||
<string name="importOptionFilesystemTitle">Importa dall\'archivio</string>
|
||||
<string name="importOptionFilesystemExplanation">Scegli un file dall\'archivio.</string>
|
||||
<string name="importOptionFilesystemButton">Dall\'archivio</string>
|
||||
<string name="importOptionApplicationTitle">Usa un’altra app</string>
|
||||
<string name="importOptionApplicationExplanation">Usa qualsiasi app o il tuo gestore di file preferito per aprire un file.</string>
|
||||
<string name="importOptionApplicationButton">Usa un’altra app</string>
|
||||
@@ -155,7 +155,7 @@
|
||||
<string name="backImageDescription">Immagine posteriore della carta</string>
|
||||
<string name="frontImageDescription">Immagine frontale della carta</string>
|
||||
<string name="passwordRequired">Si prega di inserire la password</string>
|
||||
<string name="importStocardMessage">Seleziona la tua esportazione <i>***-sync.zip</i> da Stocard per importare, e seleziona i tipi di codice a barre manualmente dopo.
|
||||
<string name="importStocardMessage">Seleziona la tua esportazione <i>***-sync.zip</i> da Stocard per importare.
|
||||
\nOppure ottenerlo inviando un\'e-mail a support@stocardapp.com chiedendo un\'esportazione dei tuoi dati.</string>
|
||||
<string name="importStocard">Importa da Stocard</string>
|
||||
<string name="turn_flashlight_off">Spegni la torcia</string>
|
||||
@@ -165,14 +165,14 @@
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> carta selezionata</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> carte selezionate</item>
|
||||
</plurals>
|
||||
<string name="deleteTitle">Rimuovi carta fedeltà</string>
|
||||
<string name="deleteTitle">Rimuovi la carta</string>
|
||||
<string name="deleteConfirmation">Eliminare questa carta\?</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">Eliminare definitivamente questa scheda <xliff:g>%d</xliff:g>\?</item>
|
||||
<item quantity="other">Eliminare definitivamente queste schede <xliff:g>%d</xliff:g>\?</item>
|
||||
</plurals>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Elimina la carta</item>
|
||||
<item quantity="other">Elimina le carte</item>
|
||||
<item quantity="one">Elimina <xliff:g>%d</xliff:g> carta</item>
|
||||
<item quantity="other">Elimina <xliff:g>%d</xliff:g> carte</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -59,7 +59,7 @@
|
||||
<string name="failedParsingImportUriError">Nepavyko iššifruoti importo URI</string>
|
||||
<string name="turn_flashlight_off">Išjunkti žibintuvėlį</string>
|
||||
<string name="turn_flashlight_on">Įjunkti žibintuvėlį</string>
|
||||
<string name="failedGeneratingShareURL">Nepavyko sugeneruoti bendrinamo URL. Praneškite apie šią klaidą!</string>
|
||||
<string name="failedGeneratingShareURL">Nepavyko sugeneruoti bendrinamo URL. Praneškite apie tai.</string>
|
||||
<string name="passwordRequired">Įveskite slaptažodį</string>
|
||||
<string name="no">Ne</string>
|
||||
<string name="yes">Taip</string>
|
||||
@@ -79,7 +79,7 @@
|
||||
<string name="setBarcodeId">Nustatyti brūkšninio kodo reikšmę</string>
|
||||
<string name="sameAsCardId">Tokia pat kaip kortelės ID</string>
|
||||
<string name="barcodeId">Brūkšninio kodo reikšmė</string>
|
||||
<string name="importStocardMessage">Pasirinkite <i>***-sync.zip</i> eksportą iš Stocard, kad galėtumėte importuoti, o vėliau brūkšninių kodų tipus pasirinkite rankiniu būdu.
|
||||
<string name="importStocardMessage">Pasirinkite <i>***-sync.zip</i> eksportą iš Stocard, kad galėtumėte importuoti.
|
||||
\nArba gaukite susisiekę el. paštu support@stocardapp.com, prašydami eksportuoti jūsų duomenis.</string>
|
||||
<string name="importStocard">Importuoti iš Stocard</string>
|
||||
<string name="importFidmeMessage">Pasirinkite <i>fidme-export-request-xxxxxx.zip</i> eksportą iš FidMe, kurį norite importuoti, ir po to brūkšninių kodų tipus pasirinkite rankiniu būdu.
|
||||
@@ -169,4 +169,14 @@
|
||||
</plurals>
|
||||
<string name="deleteTitle">Panaikinti lojalumo kortelę</string>
|
||||
<string name="deleteConfirmation">Ištrinti šią kortelę\?</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">Ištrinti šią <xliff:g>%d</xliff:g> kortelę visam laikui\?</item>
|
||||
<item quantity="few">Ištrinti šias <xliff:g>%d</xliff:g> korteles visam laikui\?</item>
|
||||
<item quantity="other">Ištrinti šias <xliff:g>%d</xliff:g> kortelių visam laikui\?</item>
|
||||
</plurals>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Ištrinti <xliff:g>%d</xliff:g> kortelę</item>
|
||||
<item quantity="few">Ištrinti <xliff:g>%d</xliff:g> korteles</item>
|
||||
<item quantity="other">Ištrinti <xliff:g>%d</xliff:g> kortelių</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="photos">Bilder</string>
|
||||
<string name="backImageDescription">Kortets bakside</string>
|
||||
<string name="frontImageDescription">Kortets forside</string>
|
||||
<string name="importStocardMessage">Velg din <i>***-sync.zip</i>-eksport fra Stocard å importere, og velg strekkodetypene manuelt etterpå.
|
||||
<string name="importStocardMessage">Velg din <i>***-sync.zip</i>-eksport fra Stocard å importere.
|
||||
\nEller få den ved å sende e-post til support@stocardapp.com der du etterspør eksport av dataen din.</string>
|
||||
<string name="passwordRequired">Skriv inn passordet</string>
|
||||
<string name="importStocard">Importer fra Stocard</string>
|
||||
@@ -172,7 +172,7 @@
|
||||
<string name="turn_flashlight_off">Skru av lommelykten</string>
|
||||
<string name="deleteTitle">Fjern kundekort</string>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Slett kort</item>
|
||||
<item quantity="other">Slett kort</item>
|
||||
<item quantity="one">Slett <xliff:g xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">%d</xliff:g> kort</item>
|
||||
<item quantity="other">Slett <xliff:g xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">%d</xliff:g> kort</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
<string name="backImageDescription">Achterzijde van de kaart</string>
|
||||
<string name="frontImageDescription">Voorzijde van de kaart</string>
|
||||
<string name="passwordRequired">Voer het wachtwoord in</string>
|
||||
<string name="importStocardMessage">Kies het te importeren Stocard-exportbestand genaamd <i>***-sync.zip</i> en kies nadien de juiste barcodes.
|
||||
<string name="importStocardMessage">Kies het te importeren Stocard-exportbestand genaamd <i>***-sync.zip</i>.
|
||||
\nOf stuur een e-mail naar support@stocardapp.com waarin je vraagt om een exportbestand.</string>
|
||||
<string name="importStocard">Importeren uit Stocard</string>
|
||||
<string name="failedGeneratingShareURL">De te delen link kan niet worden gegenereerd. Meld deze fout.</string>
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
<string name="backImageDescription">Задняя сторона карты</string>
|
||||
<string name="frontImageDescription">Лицевая сторона карты</string>
|
||||
<string name="photos">Фотографии</string>
|
||||
<string name="importStocardMessage">Выберите файл <i>***-sync.zip</i> для импортирования, а затем вручную укажите типы штрих-кодов.
|
||||
<string name="importStocardMessage">Выберите файл <i>***-sync.zip</i> для импортирования.
|
||||
\nЭтот файл можно получить по электронной почте от support@stocardapp.com, предварительно запросив экспорт ваших данных.</string>
|
||||
<string name="passwordRequired">Введите пароль</string>
|
||||
<string name="importStocard">Импорт из Stocard</string>
|
||||
@@ -177,4 +177,10 @@
|
||||
<item quantity="many">Удалить эти <xliff:g>%d</xliff:g> карт безвозвратно\?</item>
|
||||
<item quantity="other">Удалить эти <xliff:g>%d</xliff:g> карт безвозвратно\?</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Удаление <xliff:g>%d</xliff:g> карты</item>
|
||||
<item quantity="few">Удаление <xliff:g>%d</xliff:g> карт</item>
|
||||
<item quantity="many">Удаление <xliff:g>%d</xliff:g> карт</item>
|
||||
<item quantity="other">Удаление <xliff:g>%d</xliff:g> карт</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
146
app/src/main/res/values-sv/strings.xml
Normal file
146
app/src/main/res/values-sv/strings.xml
Normal file
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="settings_lock_barcode_orientation">Lås streckkodens riktning</string>
|
||||
<string name="settings_display_barcode_max_brightness">Gör streckkodsvyn ljusare</string>
|
||||
<string name="settings_max_font_size_scale">Max. teckenstorlek</string>
|
||||
<string name="settings_keep_screen_on">Håll skärmen påslagen</string>
|
||||
<string name="enterBarcodeInstructions">Ange kortets ID och välj antingen streckkodstyp nedan, eller \"Detta kort har ingen streckkod\".</string>
|
||||
<string name="importFidmeMessage">Välj den exporterade <i>fidme-export-request-xxxxxx.zip</i> från FidMe som du vill importera och välj streckkodstyper manuellt efteråt,
|
||||
\neller skapa en från din FidMe-profil först genom att välja \"Data Protection\" och sen trycka på \"Extract my data\".</string>
|
||||
<string name="importOptionApplicationExplanation">Använd vilken app som helst eller den filhanterare du föredrar för att öppna en fil.</string>
|
||||
<string name="importOptionApplicationButton">Använd en annan app</string>
|
||||
<string name="intent_import_card_from_url_share_text">Jag vill dela ett kort med dig</string>
|
||||
<string name="noGroups">Klicka på plus(+)-knappen för att lägga till kategorigrupper först.</string>
|
||||
<string name="groupsList">Grupper: <xliff:g>%s</xliff:g></string>
|
||||
<string name="errorReadingImage">Kunde inte läsa bilden</string>
|
||||
<string name="currency">Valuta</string>
|
||||
<string name="failedGeneratingShareURL">Kunde inte skapa en delningsbar URL. Var snäll och rapportera detta.</string>
|
||||
<string name="barcodeImageDescription">Bild av kortets streckkod</string>
|
||||
<string name="card_ids_copied">Kopierade kort ID:n</string>
|
||||
<plurals name="selectedCardCount">
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> kort valt</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> kort valda</item>
|
||||
</plurals>
|
||||
<string name="app_loyalty_card_keychain">Loyalty Card Keychain</string>
|
||||
<string name="importLoyaltyCardKeychainMessage">Välj den exporterade <i>LoyaltyCardKeychain.csv</i> från Loyalty Card Keychain som du vill importera,
|
||||
\neller skapa en från Import/Export-menyn i Loyalty Card Keychain först genom att trycka på Exportera.</string>
|
||||
<string name="importVoucherVaultMessage">Välj den exporterade <i>vouchervault.json</i> från Voucher Vault som du vill importera,
|
||||
\neller skapa en först genom att trycka på Exportera i Voucher Vault.</string>
|
||||
<string name="importStocardMessage">Välj den exporterade <i>***-sync.zip</i> från Stocard som du vill importera,
|
||||
\neller skaffa en först genom att skicka e-post till support@stocardapp.com och be om att få dina data exporterade.</string>
|
||||
<string name="enter_group_name">Ange gruppnamn</string>
|
||||
<string name="groups">Grupper</string>
|
||||
<plurals name="groupCardCount">
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> kort</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> kort</item>
|
||||
</plurals>
|
||||
<string name="all">Alla</string>
|
||||
<string name="deleteConfirmationGroup">Ta bort grupp\?</string>
|
||||
<string name="failedOpeningFileManager">Installera en filhanterare först.</string>
|
||||
<string name="moveUp">Flytta uppåt</string>
|
||||
<string name="moveDown">Flytta nedåt</string>
|
||||
<string name="leaveWithoutSaveTitle">Avsluta</string>
|
||||
<string name="leaveWithoutSaveConfirmation">Avsluta utan att spara\?</string>
|
||||
<string name="addManually">Ange kort-ID manuellt</string>
|
||||
<string name="addFromImage">Välj bild från galleriet</string>
|
||||
<string name="balancePoints"><xliff:g>%s</xliff:g> poäng</string>
|
||||
<string name="card">Kort</string>
|
||||
<string name="barcode">Streckkod</string>
|
||||
<string name="editBarcode">Redigera streckkod</string>
|
||||
<string name="never">Aldrig</string>
|
||||
<string name="moveBarcodeToTopOfScreen">Flytta streckkoden högst upp på skärmen</string>
|
||||
<string name="moveBarcodeToCenterOfScreen">Centrera streckkoden på skärmen</string>
|
||||
<string name="noBarcodeFound">Hittade ingen streckkod</string>
|
||||
<string name="points">Poäng</string>
|
||||
<string name="chooseImportType">Importera data från...\?</string>
|
||||
<string name="accept">Acceptera</string>
|
||||
<string name="importCatima">Importera från Catima</string>
|
||||
<string name="importFidme">Importera från FidMe</string>
|
||||
<string name="importLoyaltyCardKeychain">Importera från Loyalty Card Keychain</string>
|
||||
<string name="importStocard">Importera from Stocard</string>
|
||||
<string name="importVoucherVault">Importera från Voucher Vault</string>
|
||||
<string name="barcodeId">Streckkodsvärde</string>
|
||||
<string name="passwordRequired">Var snäll och ange lösenordet</string>
|
||||
<string name="no">Nej</string>
|
||||
<string name="yes">Ja</string>
|
||||
<string name="updateBarcodeQuestionText">Du ändrade kortets ID. Vill du uppdatera så att streckkoden också använder samma värde\?</string>
|
||||
<string name="updateBarcodeQuestionTitle">Uppdatera streckkodsvärde\?</string>
|
||||
<string name="takePhoto">Ta ett foto</string>
|
||||
<string name="removeImage">Ta bort bild</string>
|
||||
<string name="setBackImage">Ange baksidesbild</string>
|
||||
<string name="setFrontImage">Ange framsidesbild</string>
|
||||
<string name="photos">Foton</string>
|
||||
<string name="backImageDescription">Bild av kortets baksida</string>
|
||||
<string name="frontImageDescription">Bild av kortets framsida</string>
|
||||
<string name="intent_import_card_from_url_share_multiple_text">Jag vill dela några kort med dig</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">Kort-ID:n kopierades till Urklipp</string>
|
||||
<string name="wrongValueForBarcodeType">Värdet är inte giltigt för den valda streckkodstypen</string>
|
||||
<string name="unsupportedBarcodeType">Denna streckkodstyp kan ännu inte visas. Den ka komma att stödjas i en senare version av appen.</string>
|
||||
<string name="setBarcodeId">Ange streckkodsvärde</string>
|
||||
<string name="sameAsCardId">Samma som kort-ID</string>
|
||||
<string name="turn_flashlight_on">Sätt på ficklampa</string>
|
||||
<string name="turn_flashlight_off">Stäng av ficklampa</string>
|
||||
<string name="settings_dark_theme">Mörkt</string>
|
||||
<string name="settings_light_theme">Ljust</string>
|
||||
<string name="settings_theme">Tema</string>
|
||||
<string name="settings_category_title_ui">Användargränssnitt</string>
|
||||
<string name="settings">Inställningar</string>
|
||||
<string name="thumbnailDescription">Miniatyrbild av kort</string>
|
||||
<string name="copy_to_clipboard_toast">Kort-ID kopierat till Urklipp</string>
|
||||
<string name="selectBarcodeTitle">Välj streckkod</string>
|
||||
<string name="debug_version_fmt">Version: <xliff:g id="version">%s</xliff:g></string>
|
||||
<string name="about_title_fmt">Om <xliff:g id="app_name">%s</xliff:g></string>
|
||||
<string name="app_copyright_old">Baserad på Loyalty Card Keychain
|
||||
\ncopyright © 2016–2020 Branden Archer.</string>
|
||||
<string name="app_copyright_fmt" tools:ignore="PluralsCandidate">Copyright © 2019–<xliff:g>%d</xliff:g> Sylvia van Os.</string>
|
||||
<string name="about">Om</string>
|
||||
<string name="importOptionApplicationTitle">Använd en annan app</string>
|
||||
<string name="importOptionFilesystemButton">Från filsystemet</string>
|
||||
<string name="importOptionFilesystemExplanation">Välj en specifik fil från filsystemet.</string>
|
||||
<string name="importOptionFilesystemTitle">Importera från filsystem</string>
|
||||
<string name="exporting">Exporterar…</string>
|
||||
<string name="importing">Importerar…</string>
|
||||
<string name="exportFailed">Kunde inte exportera kort</string>
|
||||
<string name="importFailed">Kunde inte importera kort</string>
|
||||
<string name="importSuccessfulTitle">Importen lyckades</string>
|
||||
<string name="importFailedTitle">Importen misslyckades</string>
|
||||
<string name="importExportHelp">Säkerhetskopiering av dina kort låter dig flytta dem till en annan enhet.</string>
|
||||
<string name="importExport">Importera/Exportera</string>
|
||||
<string name="noCardExistsError">Kunde inte hitta kort</string>
|
||||
<string name="noCardIdError">Inget kort-ID har angivits</string>
|
||||
<string name="noStoreError">Inget namn har angivits</string>
|
||||
<string name="noCardsMessage">Lägg till ett kort först</string>
|
||||
<string name="cardShortcut">Kort-genväg</string>
|
||||
<string name="addCardTitle">Lägg till kort</string>
|
||||
<string name="editCardTitle">Redigera kort</string>
|
||||
<string name="sendLabel">Skicka…</string>
|
||||
<string name="share">Dela</string>
|
||||
<string name="copy_to_clipboard">Kopiera ID till Urklipp</string>
|
||||
<string name="ok">OK</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">Ta bort detta <xliff:g>%d</xliff:g> kort permanent\?</item>
|
||||
<item quantity="other">Ta bort dessa <xliff:g>%d</xliff:g> kort permanent\?</item>
|
||||
</plurals>
|
||||
<string name="deleteConfirmation">Ta bort detta kort permanent\?</string>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Ta bort <xliff:g>%d</xliff:g> kort</item>
|
||||
<item quantity="other">Ta bort <xliff:g>%d</xliff:g> kort</item>
|
||||
</plurals>
|
||||
<string name="deleteTitle">Ta bort kort</string>
|
||||
<string name="confirm">Bekräfta</string>
|
||||
<string name="delete">Ta bort</string>
|
||||
<string name="edit">Redigera</string>
|
||||
<string name="save">Spara</string>
|
||||
<string name="cancel">Avbryt</string>
|
||||
<string name="unstar">Ta bort från favoriter</string>
|
||||
<string name="star">Lägg till i favoriter</string>
|
||||
<string name="noBarcode">Ingen streckkod</string>
|
||||
<string name="barcodeNoBarcode">Detta kort har ingen streckkod</string>
|
||||
<string name="barcodeType">Streckkodstyp</string>
|
||||
<string name="cardId">Kort-ID</string>
|
||||
<string name="storeName">Namn</string>
|
||||
<string name="noMatchingGiftCards">Hittade ingenting. Försök justera din sökning.</string>
|
||||
<string name="noGiftCards">Klicka på plus(+)-knappen för att lägga till ett kort, eller importera några från ⋮-menyn först.</string>
|
||||
<string name="action_add">Lägg till</string>
|
||||
<string name="action_search">Sök</string>
|
||||
</resources>
|
||||
@@ -188,7 +188,7 @@
|
||||
<string name="importLoyaltyCardKeychain">Import from Loyalty Card Keychain</string>
|
||||
<string name="importLoyaltyCardKeychainMessage">Select your <i>LoyaltyCardKeychain.csv</i> export from Loyalty Card Keychain to import.\nOr create it from the "Import/Export" menu in Loyalty Card Keychain by pressing "Export" there first.</string>
|
||||
<string name="importStocard">Import from Stocard</string>
|
||||
<string name="importStocardMessage">Select your <i>***-sync.zip</i> export from Stocard to import, and select the barcode types manually afterwards.\nOr get it by e-mailing support@stocardapp.com asking for an export of your data.</string>
|
||||
<string name="importStocardMessage">Select your <i>***-sync.zip</i> export from Stocard to import.\nOr get it by e-mailing support@stocardapp.com asking for an export of your data.</string>
|
||||
<string name="importVoucherVault">Import from Voucher Vault</string>
|
||||
<string name="importVoucherVaultMessage">Select your <i>vouchervault.json</i> export from Voucher Vault to import.\nOr create it by pressing "Export" in Voucher Vault first.</string>
|
||||
<string name="barcodeId">Barcode value</string>
|
||||
|
||||
@@ -980,7 +980,9 @@ public class ImportExportTest
|
||||
"1,Card 1,Note 1,1618053234,100,USD,1234,5432,1,QR_CODE,0,\r\n" +
|
||||
"8,Clothes Store,Note about store,,0,,a,,-5317,,0,\n" +
|
||||
"2,Department Store,,1618041729,0,,A,,-9977996,,0,\n" +
|
||||
"3,Grocery Store,,,150,,dhd,,-9977996,,0,\n" +
|
||||
"3,Grocery Store,\"Multiline note about grocery store\n" +
|
||||
"\n" +
|
||||
"with blank line\",,150,,dhd,,-9977996,,0,\n" +
|
||||
"4,Pharmacy,,,0,,dhshsvshs,,-10902850,,1,\n" +
|
||||
"5,Restaurant,Note about restaurant here,,0,,98765432,23456,-10902850,CODE_128,0,\n" +
|
||||
"6,Shoe Store,,,12.50,EUR,a,-5317,,AZTEC,0,\n" +
|
||||
@@ -1065,7 +1067,7 @@ public class ImportExportTest
|
||||
LoyaltyCard card3 = db.getLoyaltyCard(3);
|
||||
|
||||
assertEquals("Grocery Store", card3.store);
|
||||
assertEquals("", card3.note);
|
||||
assertEquals("Multiline note about grocery store\n\nwith blank line", card3.note);
|
||||
assertEquals(null, card3.expiry);
|
||||
assertEquals(new BigDecimal("150"), card3.balance);
|
||||
assertEquals(null, card3.balanceType);
|
||||
@@ -1197,7 +1199,7 @@ public class ImportExportTest
|
||||
assertEquals(null, card.balanceType);
|
||||
assertEquals("55555", card.cardId);
|
||||
assertEquals(null, card.barcodeId);
|
||||
assertEquals(null, card.barcodeType);
|
||||
assertEquals(BarcodeFormat.EAN_13, card.barcodeType);
|
||||
assertEquals(0, card.starStatus);
|
||||
|
||||
assertNull(Utils.retrieveCardImage(activity.getApplicationContext(), 1, true));
|
||||
@@ -1212,7 +1214,7 @@ public class ImportExportTest
|
||||
assertEquals(null, card.balanceType);
|
||||
assertEquals("7649484", card.cardId);
|
||||
assertEquals(null, card.barcodeId);
|
||||
assertEquals(null, card.barcodeType);
|
||||
assertEquals(BarcodeFormat.EAN_13, card.barcodeType);
|
||||
assertEquals(0, card.starStatus);
|
||||
|
||||
assertTrue(BitmapFactory.decodeStream(getClass().getResourceAsStream("stocard-front.jpg")).sameAs(Utils.retrieveCardImage(activity.getApplicationContext(), 2, true)));
|
||||
@@ -1220,7 +1222,8 @@ public class ImportExportTest
|
||||
|
||||
card = db.getLoyaltyCard(3);
|
||||
|
||||
assertEquals("jö", card.store);
|
||||
// I don't think we can know this one, but falling back to an unique store name is at least something
|
||||
assertEquals("63536738-d64b-48ae-aeb8-82761523fa67", card.store);
|
||||
assertEquals("", card.note);
|
||||
assertEquals(null, card.expiry);
|
||||
assertEquals(new BigDecimal("0"), card.balance);
|
||||
|
||||
@@ -25,6 +25,8 @@ import java.util.Currency;
|
||||
import java.util.Date;
|
||||
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.DefaultItemAnimator;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import protect.card_locker.preferences.Settings;
|
||||
|
||||
@@ -61,8 +63,8 @@ public class LoyaltyCardCursorAdapterTest
|
||||
{
|
||||
LoyaltyCardCursorAdapter adapter = new LoyaltyCardCursorAdapter(activity.getApplicationContext(), cursor, (MainActivity) activity);
|
||||
|
||||
RecyclerView.ViewHolder viewHolder = adapter.createViewHolder(activity.findViewById(R.id.list), 0);
|
||||
adapter.bindViewHolder((LoyaltyCardCursorAdapter.LoyaltyCardListItemViewHolder) viewHolder, cursor.getPosition());
|
||||
LoyaltyCardCursorAdapter.LoyaltyCardListItemViewHolder viewHolder = adapter.createViewHolder(activity.findViewById(R.id.list), 0);
|
||||
adapter.bindViewHolder(viewHolder, cursor.getPosition());
|
||||
|
||||
return viewHolder.itemView;
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ public class LoyaltyCardViewActivityTest
|
||||
}
|
||||
|
||||
@Test
|
||||
public void noDataLossOnResume()
|
||||
public void noDataLossOnResumeOrRotate()
|
||||
{
|
||||
registerMediaStoreIntentHandler();
|
||||
|
||||
@@ -421,6 +421,22 @@ public class LoyaltyCardViewActivityTest
|
||||
|
||||
// Check if no changes lost
|
||||
checkAllFields(activity, newCard ? ViewMode.ADD_CARD : ViewMode.UPDATE_CARD, "correct store", "correct note", DateFormat.getDateInstance(DateFormat.LONG).format(expiryDate), "100.00", currency.getSymbol(), "12345678", "87654321", BarcodeFormat.QR_CODE.name(), frontBitmap, backBitmap);
|
||||
|
||||
// Rotate to landscape
|
||||
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
activity.recreate();
|
||||
shadowOf(getMainLooper()).idle();
|
||||
|
||||
// Check if no changes lost
|
||||
checkAllFields(activity, newCard ? ViewMode.ADD_CARD : ViewMode.UPDATE_CARD, "correct store", "correct note", DateFormat.getDateInstance(DateFormat.LONG).format(expiryDate), "100.00", currency.getSymbol(), "12345678", "87654321", BarcodeFormat.QR_CODE.name(), frontBitmap, backBitmap);
|
||||
|
||||
// Rotate to portrait
|
||||
shadowOf(getMainLooper()).idle();
|
||||
activity.recreate();
|
||||
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
|
||||
// Check if no changes lost
|
||||
checkAllFields(activity, newCard ? ViewMode.ADD_CARD : ViewMode.UPDATE_CARD, "correct store", "correct note", DateFormat.getDateInstance(DateFormat.LONG).format(expiryDate), "100.00", currency.getSymbol(), "12345678", "87654321", BarcodeFormat.QR_CODE.name(), frontBitmap, backBitmap);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1157,7 +1173,6 @@ public class LoyaltyCardViewActivityTest
|
||||
|
||||
TextViewCompat.getAutoSizeMaxTextSize(storeName);
|
||||
TextViewCompat.getAutoSizeMaxTextSize(storeName);
|
||||
assertEquals(LARGE_FONT_SIZE, (int)storeName.getTextSize());
|
||||
assertEquals(LARGE_FONT_SIZE, TextViewCompat.getAutoSizeMaxTextSize(cardIdFieldView));
|
||||
|
||||
shadowOf(activity).clickMenuItem(android.R.id.home);
|
||||
|
||||
1
fastlane/metadata/android/cs/short_description.txt
Normal file
1
fastlane/metadata/android/cs/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
Pro čárové kódy, členství, věrnostní programy, kupony a vstupenky.
|
||||
1
fastlane/metadata/android/cs/title.txt
Normal file
1
fastlane/metadata/android/cs/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
Catima - Peněženka Libre Card
|
||||
1
fastlane/metadata/android/da/short_description.txt
Normal file
1
fastlane/metadata/android/da/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
Til dine stregkoder, medlemskaber, loyalitetsprogrammer, kuponer og billetter.
|
||||
1
fastlane/metadata/android/da/title.txt
Normal file
1
fastlane/metadata/android/da/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
Catima - Den frie kortpung
|
||||
@@ -8,7 +8,7 @@ Med dette essensielle verktøyet kan du erstatte unyttig plast med kontanter.
|
||||
- Unngå spionasje med veldig få tilganger. Ingen tilgang til Internett, og ingen reklame.
|
||||
- Legg til kort eller koder med navn og egne farger.
|
||||
- Manuell kodeinnskriving hvis det ikke er noen strekkode å lagre, eller den ikke kan brukes.
|
||||
- Importer kort og koder fra filer, Catima, Loyalty Card Keychain, Voucher Vault, og FidMe.
|
||||
- Importer kort og koder fra filer ,Catima, FidMe, Kundekortknippe, Stocard og Voucher Vault.
|
||||
- Lag en sikkerhetskopi av alle kortene dine og overfør dem til en ny enhet hvis du ønsker det.
|
||||
- Del kupponger, eksklusive tilbud, promokoder eller kort og koder ved bruk av ethvert program.
|
||||
- Mørk drakt og tilgjengelighetsvalg for synshemmede brukere.
|
||||
|
||||
1
fastlane/metadata/android/sv/short_description.txt
Normal file
1
fastlane/metadata/android/sv/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
För dina streckkoder, medlemskap, kundklubbar, kuponger och biljetter.
|
||||
Reference in New Issue
Block a user