mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-21 20:19:23 +01:00
Refactor for internationalisation of source code
This commit is contained in:
parent
2a22187ca3
commit
15c4f7c956
18 changed files with 98 additions and 99 deletions
|
@ -70,7 +70,7 @@ dependencies {
|
|||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.core:core:1.3.2'
|
||||
|
||||
debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
|
||||
// debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
|
||||
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</activity>
|
||||
<activity
|
||||
android:name=".DrugDetailActivity"
|
||||
android:label="@string/title_medicament_detail"
|
||||
android:label="@string/title_drug_detail"
|
||||
android:parentActivityName=".DrugListActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
<meta-data
|
||||
|
|
Binary file not shown.
|
@ -36,6 +36,7 @@ class DBDrugs extends SQLiteOpenHelper {
|
|||
private static final String TAG = DBDrugs.class.getName();
|
||||
|
||||
|
||||
|
||||
DBDrugs(Context context) {
|
||||
super(context, dbName, null, DATABASE_VERSION);
|
||||
this.myContext = context;
|
||||
|
@ -49,10 +50,6 @@ class DBDrugs extends SQLiteOpenHelper {
|
|||
return false;
|
||||
}
|
||||
return true;
|
||||
/* if (myContext.getDatabasePath(String.valueOf(database)) != null)
|
||||
return true;
|
||||
else
|
||||
return false;*/
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -121,7 +118,7 @@ class DBDrugs extends SQLiteOpenHelper {
|
|||
* @return return a drug object
|
||||
*/
|
||||
Drug getDrugByCIP13(String cip13) {
|
||||
Log.e(TAG, "CIP13 - " + cip13);
|
||||
Log.d(TAG, "CIP13 - " + cip13);
|
||||
|
||||
SQLiteDatabase db = this.getReadableDatabase();
|
||||
|
||||
|
|
|
@ -6,12 +6,9 @@ import android.database.Cursor;
|
|||
import android.database.DatabaseUtils;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.os.Build;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
@ -35,17 +32,17 @@ class DBHelper extends SQLiteOpenHelper {
|
|||
private static final String KEY_ADMIN = "administration_mode";
|
||||
private static final String KEY_PRES = "presentation";
|
||||
private static final String KEY_STOCK = "stock";
|
||||
private static final String KEY_PRISE = "take";
|
||||
private static final String KEY_SEUIL_WARN = "warning";
|
||||
private static final String KEY_SEUIL_ALERT = "alert";
|
||||
private static final String KEY_TAKE = "take";
|
||||
private static final String KEY_THRESHOLD_WARN = "warning";
|
||||
private static final String KEY_THRESHOLD_ALERT = "alert";
|
||||
private static final String KEY_LAST_UPDATE = "last_update";
|
||||
|
||||
final List<Drug> drugs = new ArrayList<>();
|
||||
|
||||
private static final String TAG = DBHelper.class.getName();
|
||||
|
||||
private static final String[] COLUMS = {KEY_ID, KEY_CIS,KEY_CIP13, KEY_NAME, KEY_ADMIN, KEY_PRES, KEY_STOCK, KEY_PRISE,
|
||||
KEY_SEUIL_WARN, KEY_SEUIL_ALERT, KEY_LAST_UPDATE};
|
||||
private static final String[] COLUMS = {KEY_ID, KEY_CIS,KEY_CIP13, KEY_NAME, KEY_ADMIN, KEY_PRES, KEY_STOCK, KEY_TAKE,
|
||||
KEY_THRESHOLD_WARN, KEY_THRESHOLD_ALERT, KEY_LAST_UPDATE};
|
||||
|
||||
DBHelper(Context context) {
|
||||
super(context, DATABASE_NAME, null, DATABASE_VERSION);
|
||||
|
@ -108,9 +105,9 @@ class DBHelper extends SQLiteOpenHelper {
|
|||
values.put(KEY_ADMIN, drug.getAdministration_mode());
|
||||
values.put(KEY_PRES, drug.getPresentation());
|
||||
values.put(KEY_STOCK, drug.getStock());
|
||||
values.put(KEY_PRISE, drug.getTake());
|
||||
values.put(KEY_SEUIL_WARN, drug.getWarnThreshold());
|
||||
values.put(KEY_SEUIL_ALERT, drug.getAlertThreshold());
|
||||
values.put(KEY_TAKE, drug.getTake());
|
||||
values.put(KEY_THRESHOLD_WARN, drug.getWarnThreshold());
|
||||
values.put(KEY_THRESHOLD_ALERT, drug.getAlertThreshold());
|
||||
values.put(KEY_LAST_UPDATE, drug.getDateLastUpdate());
|
||||
|
||||
// Calculate some drug's fields
|
||||
|
@ -222,7 +219,7 @@ class DBHelper extends SQLiteOpenHelper {
|
|||
|
||||
/**
|
||||
*
|
||||
* @return a Sorted and updated by dateEndOfStock List of All medicaments presents in database
|
||||
* @return a Sorted and updated by dateEndOfStock List of All drugs presents in database
|
||||
*/
|
||||
|
||||
List<Drug> getAllDrugs() {
|
||||
|
@ -256,7 +253,7 @@ class DBHelper extends SQLiteOpenHelper {
|
|||
drug.setDateEndOfStock();
|
||||
|
||||
|
||||
// Add drug to medicaments
|
||||
// Add drug to Drugs
|
||||
drugs.add(drug);
|
||||
} while (cursor.moveToNext());
|
||||
}
|
||||
|
@ -318,7 +315,7 @@ class DBHelper extends SQLiteOpenHelper {
|
|||
values.put(KEY_ADMIN, drug.getAdministration_mode());
|
||||
values.put(KEY_PRES, drug.getPresentation());
|
||||
values.put(KEY_STOCK, drug.getStock());
|
||||
values.put(KEY_PRISE, drug.getTake());
|
||||
values.put(KEY_TAKE, drug.getTake());
|
||||
values.put(KEY_LAST_UPDATE, drug.getDateLastUpdate());
|
||||
|
||||
String[] selectionArgs = { String.valueOf(drug.getId()) };
|
||||
|
|
|
@ -2,10 +2,6 @@ package net.foucry.pilldroid;
|
|||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
@ -13,6 +9,10 @@ import android.widget.EditText;
|
|||
import android.widget.ImageButton;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static net.foucry.pilldroid.R.id.detail_toolbar;
|
||||
|
@ -42,7 +42,7 @@ public class DrugDetailActivity extends AppCompatActivity {
|
|||
assert drug != null;
|
||||
Log.d(TAG, "drug == " + drug.toString());
|
||||
|
||||
setContentView(R.layout.activity_medicament_detail);
|
||||
setContentView(R.layout.activity_durg_detail);
|
||||
Toolbar toolbar = findViewById(detail_toolbar);
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class DrugDetailActivity extends AppCompatActivity {
|
|||
public void onClick(View view) {
|
||||
Log.d(TAG, "Click on save icon");
|
||||
|
||||
getMedicamentChanges();
|
||||
getMDrugChanges();
|
||||
setResult(1);
|
||||
finish();
|
||||
overridePendingTransition(R.anim.slide_from_left, R.anim.slide_to_right);
|
||||
|
@ -88,7 +88,7 @@ public class DrugDetailActivity extends AppCompatActivity {
|
|||
DrugDetailFragment fragment = new DrugDetailFragment();
|
||||
fragment.setArguments(arguments);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.medicament_detail_container, fragment)
|
||||
.add(R.id.drug_detail_container, fragment)
|
||||
.commit();
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public class DrugDetailActivity extends AppCompatActivity {
|
|||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private void getMedicamentChanges()
|
||||
private void getMDrugChanges()
|
||||
{
|
||||
Log.d(TAG, "Time to save new values");
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ public class DrugDetailFragment extends Fragment {
|
|||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View detailView = inflater.inflate(R.layout.medicament_detail, container, false);
|
||||
View detailView = inflater.inflate(R.layout.drug_detail, container, false);
|
||||
View nameView;
|
||||
View adminModeView;
|
||||
View presentationView;
|
||||
|
@ -74,51 +74,51 @@ public class DrugDetailFragment extends Fragment {
|
|||
nameView = detailView.findViewById(R.id.name_cell);
|
||||
TextView nameLabel = nameView.findViewById(R.id.label);
|
||||
TextView nameValue = nameView.findViewById(R.id.value);
|
||||
nameLabel.setText(R.string.med_name_label);
|
||||
nameLabel.setText(R.string.drug_name_label);
|
||||
nameValue.setText(drug.getName());
|
||||
|
||||
presentationView = detailView.findViewById(R.id.presentation_cell);
|
||||
TextView presentationLabel = presentationView.findViewById(R.id.label);
|
||||
TextView presentationValue = presentationView.findViewById(R.id.value);
|
||||
presentationLabel.setText(R.string.med_presention_labal);
|
||||
presentationLabel.setText(R.string.drug_presention_labal);
|
||||
presentationValue.setText(drug.getPresentation());
|
||||
|
||||
adminModeView = detailView.findViewById(R.id.administration_cell);
|
||||
TextView adminModeLabel = adminModeView.findViewById(R.id.label);
|
||||
TextView adminModeValue = adminModeView.findViewById(R.id.value);
|
||||
adminModeLabel.setText(R.string.med_administationMode_label);
|
||||
adminModeLabel.setText(R.string.drug_administationMode_label);
|
||||
adminModeValue.setText(drug.getAdministration_mode());
|
||||
|
||||
stockView = detailView.findViewById(R.id.stock_cell);
|
||||
TextView stockLibelle = (stockView.findViewById(R.id.label));
|
||||
TextView stockValue = stockView.findViewById(R.id.value);
|
||||
stockLibelle.setText(R.string.med_current_stock_label);
|
||||
stockLibelle.setText(R.string.drug_current_stock_label);
|
||||
stockValue.setText(Double.toString(drug.getStock()));
|
||||
stockValue.setHint(R.string.med_current_stock_label);
|
||||
stockValue.setHint(R.string.drug_current_stock_label);
|
||||
stockValue.setSelectAllOnFocus(true);
|
||||
|
||||
takeView = detailView.findViewById(R.id.take_cell);
|
||||
TextView priseLabel = takeView.findViewById(R.id.label);
|
||||
TextView priseValue = (takeView.findViewById(R.id.value));
|
||||
priseLabel.setText(R.string.med_take_label);
|
||||
priseLabel.setText(R.string.drug_take_label);
|
||||
priseValue.setText(Double.toString(drug.getTake()));
|
||||
priseValue.setHint(R.string.med_take_label);
|
||||
priseValue.setHint(R.string.drug_take_label);
|
||||
priseValue.setSelectAllOnFocus(true);
|
||||
|
||||
warningView = detailView.findViewById(R.id.warning_cell);
|
||||
TextView warningLibelle = warningView.findViewById(R.id.label);
|
||||
TextView warningValue = warningView.findViewById(R.id.value);
|
||||
warningLibelle.setText(R.string.med_warningTherehold_label);
|
||||
warningLibelle.setText(R.string.drug_warningTherehold_label);
|
||||
warningValue.setText(Integer.toString(drug.getWarnThreshold()));
|
||||
warningValue.setHint(R.string.med_warningTherehold_label);
|
||||
warningValue.setHint(R.string.drug_warningTherehold_label);
|
||||
warningValue.setSelectAllOnFocus(true);
|
||||
|
||||
alertView = detailView.findViewById(R.id.alert_cell);
|
||||
TextView alertLibelle = alertView.findViewById(R.id.label);
|
||||
TextView alertValue = alertView.findViewById(R.id.value);
|
||||
alertLibelle.setText(R.string.med_alertTherehold_label);
|
||||
alertLibelle.setText(R.string.drug_alertTherehold_label);
|
||||
alertValue.setText(Integer.toString(drug.getAlertThreshold()));
|
||||
alertValue.setHint(R.string.med_alertTherehold_label);
|
||||
alertValue.setHint(R.string.drug_alertTherehold_label);
|
||||
alertValue.setSelectAllOnFocus(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ import static net.foucry.pilldroid.UtilDate.date2String;
|
|||
import static net.foucry.pilldroid.Utils.intRandomExclusive;
|
||||
|
||||
/**
|
||||
* An activity representing a list of Medicaments. This activity
|
||||
* An activity representing a list of Drugs is activity
|
||||
* has different presentations for handset and tablet-size devices. On
|
||||
* handsets, the activity presents a list of items, which when touched,
|
||||
* lead to a {@link DrugDetailActivity} representing
|
||||
|
@ -115,7 +115,7 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
}
|
||||
drugs = dbHelper.getAllDrugs();
|
||||
|
||||
View mRecyclerView = findViewById(R.id.medicament_list);
|
||||
View mRecyclerView = findViewById(R.id.drug_list);
|
||||
assert mRecyclerView != null;
|
||||
setupRecyclerView((RecyclerView) mRecyclerView);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_medicament_list);
|
||||
setContentView(R.layout.activity_drug_list);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
dbHelper = new DBHelper(this);
|
||||
|
@ -286,9 +286,9 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
cip13 = result.getContents().substring(4, 17);
|
||||
}
|
||||
|
||||
// Get Medoc from database
|
||||
final Drug scannedMedoc = dbDrug.getDrugByCIP13(cip13);
|
||||
askToAddInDB(scannedMedoc);
|
||||
// Get Drug from database
|
||||
final Drug scannedDrug = dbDrug.getDrugByCIP13(cip13);
|
||||
askToAddInDB(scannedDrug);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -311,8 +311,8 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
.setPositiveButton("OK", (dialog, id) -> {
|
||||
String cip13 = editText.getText().toString();
|
||||
|
||||
Drug med = dbDrug.getDrugByCIP13(cip13);
|
||||
askToAddInDB(med);
|
||||
Drug aDrug = dbDrug.getDrugByCIP13(cip13);
|
||||
askToAddInDB(aDrug);
|
||||
})
|
||||
.setNegativeButton("Cancel",
|
||||
(dialog, id) -> dialog.cancel());
|
||||
|
@ -342,14 +342,14 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
/**
|
||||
* Ask if the drug found in the database should be include in the
|
||||
* user database
|
||||
* @param med Drug- drug to be added
|
||||
* @param aDrug Drug- drug to be added
|
||||
*/
|
||||
private void askToAddInDB(Drug med) {
|
||||
private void askToAddInDB(Drug aDrug) {
|
||||
AlertDialog.Builder dlg = new AlertDialog.Builder(this);
|
||||
dlg.setTitle(getString(R.string.app_name));
|
||||
|
||||
if (med != null) {
|
||||
String msg = med.getName() + " " + getString(R.string.msgFound);
|
||||
if (aDrug != null) {
|
||||
String msg = aDrug.getName() + " " + getString(R.string.msgFound);
|
||||
|
||||
dlg.setMessage(msg);
|
||||
dlg.setNegativeButton(getString(R.string.button_cancel), (dialog, which) -> {
|
||||
|
@ -357,7 +357,7 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
});
|
||||
dlg.setPositiveButton(getString(R.string.button_ok), (dialog, which) -> {
|
||||
// Add Drug to DB then try to show it
|
||||
addMedToList(med);
|
||||
addDrugToList(aDrug);
|
||||
});
|
||||
} else {
|
||||
dlg.setMessage(getString(R.string.msgNotFound));
|
||||
|
@ -370,17 +370,17 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
|
||||
/**
|
||||
* Add New drug to the user database
|
||||
* @param med Drug - drug to be added
|
||||
* @param aDrug Drug - drug to be added
|
||||
*/
|
||||
private void addMedToList(Drug med)
|
||||
private void addDrugToList(Drug aDrug)
|
||||
{
|
||||
med.setDateEndOfStock();
|
||||
mAdapter.addItem(med);
|
||||
aDrug.setDateEndOfStock();
|
||||
mAdapter.addItem(aDrug);
|
||||
|
||||
Log.d(TAG, "Call DrugDetailActivity");
|
||||
Context context = this;
|
||||
Intent intent = new Intent(context, DrugDetailActivity.class);
|
||||
intent.putExtra("drug", med);
|
||||
intent.putExtra("drug", aDrug);
|
||||
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE);
|
||||
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
|
||||
}
|
||||
|
@ -418,6 +418,9 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
AlarmManager.INTERVAL_DAY, alarmIntent);
|
||||
|
||||
Log.d(TAG, "Alarm scheduled for " + UtilDate.convertDate(calendar.getTimeInMillis()));
|
||||
|
||||
Toast.makeText(getApplicationContext(), "Alarm scheduled for \" + UtilDate.convertDate(calendar.getTimeInMillis())\"", Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
/**
|
||||
* setupRecyclerView (list of drugs
|
||||
|
@ -451,11 +454,11 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
mValues = items;
|
||||
}
|
||||
|
||||
void addItem(Drug scannedMedoc) {
|
||||
if (!dbHelper.isDrugExist(scannedMedoc.getCip13())) {
|
||||
mValues.add(scannedMedoc);
|
||||
void addItem(Drug scannedDrug) {
|
||||
if (!dbHelper.isDrugExist(scannedDrug.getCip13())) {
|
||||
mValues.add(scannedDrug);
|
||||
notifyDataSetChanged();
|
||||
dbHelper.addDrug(scannedMedoc);
|
||||
dbHelper.addDrug(scannedDrug);
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(), "aleready in the database", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
@ -465,7 +468,7 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.medicament_list_content, parent, false);
|
||||
.inflate(R.layout.drug_list_content, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,10 +2,11 @@ package net.foucry.pilldroid;
|
|||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class Utils {
|
||||
private static final String TAG = UtilDate.class.getName();
|
||||
|
||||
public static void CopyStream(InputStream is, OutputStream os)
|
||||
{
|
||||
final int buffer_size=1024;
|
||||
|
@ -33,4 +34,5 @@ public class Utils {
|
|||
Random r = new Random();
|
||||
return r.nextInt(max - min) +max;
|
||||
}
|
||||
|
||||
}
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/medicament_list"
|
||||
android:id="@+id/drug_list"
|
||||
android:name="net.foucry.pilldroid.MedicamentListFragment"
|
||||
android:layout_width="@dimen/item_width"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -27,10 +27,10 @@
|
|||
android:layout_marginRight="16dp"
|
||||
app:layoutManager="LinearLayoutManager"
|
||||
tools:context="net.foucry.pilldroid.DrugListActivity"
|
||||
tools:listitem="@layout/medicament_list_content" />
|
||||
tools:listitem="@layout/drug_list_content" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/medicament_detail_container"
|
||||
android:id="@+id/drug_detail_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3" />
|
|
@ -28,7 +28,7 @@
|
|||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<include
|
||||
layout="@layout/medicament_list"
|
||||
layout="@layout/drug_list"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"/>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/medicament_detail_container"
|
||||
android:id="@+id/drug_detail_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
@ -51,7 +51,7 @@
|
|||
android:contentDescription="@string/save_button"
|
||||
android:src="@drawable/ic_save_black_24dp"
|
||||
app:backgroundTint="@android:color/transparent"
|
||||
app:layout_anchor="@+id/medicament_detail_container"
|
||||
app:layout_anchor="@+id/drug_detail_container"
|
||||
app:layout_anchorGravity="top|end" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -1,6 +1,6 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/medicament_detail"
|
||||
android:id="@+id/drug_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
|
@ -2,11 +2,11 @@
|
|||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/medicament_list"
|
||||
android:id="@+id/drug_list"
|
||||
android:name="net.foucry.pilldroid.MedicamentListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="LinearLayoutManager"
|
||||
android:background="@drawable/list_selector"
|
||||
tools:context="net.foucry.pilldroid.DrugListActivity"
|
||||
tools:listitem="@layout/medicament_list_content" />
|
||||
tools:listitem="@layout/drug_list_content" />
|
|
@ -15,7 +15,7 @@
|
|||
android:layout_height="50sp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@drawable/ok_stock_vect"
|
||||
android:contentDescription="@string/icone_de_stock"
|
||||
android:contentDescription="@string/stockIcon"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
android:id="@+id/value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nom_m_dicament"
|
||||
android:text="@string/drugName"
|
||||
android:textColor="#040404"
|
||||
android:typeface="sans"
|
||||
android:textSize="16sp"
|
|
@ -14,7 +14,7 @@
|
|||
<ImageView
|
||||
android:layout_width="@dimen/screen_shot_height"
|
||||
android:layout_height="@dimen/screen_shot_height"
|
||||
android:contentDescription="@string/medicament_info"
|
||||
android:contentDescription="@string/drug_info"
|
||||
android:src="@drawable/info" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">PillDroid</string>
|
||||
<string name="title_medicament_detail">Détail Médicament</string>
|
||||
<string name="title_drug_detail">Détail Médicament</string>
|
||||
<string name="button_cancel">Annuler</string>
|
||||
<string name="button_ok">OK</string>
|
||||
<string name="med_presention_labal">Présentation</string>
|
||||
<string name="med_name_label">Nom</string>
|
||||
<string name="med_administationMode_label">Mode d\'adminitration</string>
|
||||
<string name="drug_presention_labal">Présentation</string>
|
||||
<string name="drug_name_label">Nom</string>
|
||||
<string name="drug_administationMode_label">Mode d\'adminitration</string>
|
||||
<string name="msgNotFound">Médicament introuvable dans la base de données</string>
|
||||
<string name="about">À propos</string>
|
||||
<string name="help">Aide</string>
|
||||
<string name="med_take_label">Prise</string>
|
||||
<string name="med_alertTherehold_label">Seuil critique</string>
|
||||
<string name="med_warningTherehold_label">Seuil d\'alerte</string>
|
||||
<string name="drug_take_label">Prise</string>
|
||||
<string name="drug_alertTherehold_label">Seuil critique</string>
|
||||
<string name="drug_warningTherehold_label">Seuil d\'alerte</string>
|
||||
<string name="msgFound">Médicament trouvé dans la base de données</string>
|
||||
<string name="med_current_stock_label">Stock courant</string>
|
||||
<string name="drug_current_stock_label">Stock courant</string>
|
||||
<string name="turn_off_flashlight">Éteindre le flash</string>
|
||||
<string name="turn_on_flashlight">Allumer le flash</string>
|
||||
<string name="notification_text">Vous devez passer à la pharmacie</string>
|
||||
|
@ -55,7 +55,7 @@
|
|||
<string name="neutral_face">Visage neutre</string>
|
||||
<string name="unhappy_face">Visage grincheux</string>
|
||||
<string name="slide8_desc">Informations sur le médicament</string>
|
||||
<string name="medicament_info">Capture d\'écran sur la partie information du médicament</string>
|
||||
<string name="drug_info">Capture d\'écran sur la partie information du médicament</string>
|
||||
<string name="slide9_desc">Réglages du stock courant, prise et valeurs d\'attention et d\'alerte</string>
|
||||
<string name="tunables">Réglages</string>
|
||||
<string name="slide10_desc">Mettre la prise à zéro suspend le traitement et les calculs de stock</string>
|
||||
|
@ -67,8 +67,8 @@
|
|||
<string name="next">Suivant</string>
|
||||
<string name="start">Démarrer</string>
|
||||
<string name="add_button">Ajout d\'un médicament à votre liste</string>
|
||||
<string name="nom_m_dicament">Nom Médicament</string>
|
||||
<string name="icone_de_stock">Icône de stock</string>
|
||||
<string name="drugName">Nom Médicament</string>
|
||||
<string name="stockIcon">Icône de stock</string>
|
||||
<string name="cip13_goes_here">Ici le cip13</string>
|
||||
<string name="Date">lundi 1 janvier 2001</string>
|
||||
<string name="Value">Valeur</string>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<resources>
|
||||
<string name="app_name">PillDroid</string>
|
||||
<string name="title_medicament_detail">Medicament Detail</string>
|
||||
<string name="title_drug_detail">Drug Detail</string>
|
||||
<string name="button_cancel">Cancel</string>
|
||||
<string name="button_ok">OK</string>
|
||||
<string name="msgNotFound">Drug not found in the database</string>
|
||||
|
@ -10,13 +10,13 @@
|
|||
<string name="notification_text">You have to go to the pharmacy</string>
|
||||
<string name="turn_on_flashlight">Turn Flash On</string>
|
||||
<string name="turn_off_flashlight">Turn Flash Off</string>
|
||||
<string name="med_name_label">Name</string>
|
||||
<string name="med_presention_labal">Presentation</string>
|
||||
<string name="med_administationMode_label">Administration mode</string>
|
||||
<string name="med_current_stock_label">Current stock</string>
|
||||
<string name="med_take_label">Take</string>
|
||||
<string name="med_warningTherehold_label">Alert therehold</string>
|
||||
<string name="med_alertTherehold_label">Critical threhold</string>
|
||||
<string name="drug_name_label">Name</string>
|
||||
<string name="drug_presention_labal">Presentation</string>
|
||||
<string name="drug_administationMode_label">Administration mode</string>
|
||||
<string name="drug_current_stock_label">Current stock</string>
|
||||
<string name="drug_take_label">Take</string>
|
||||
<string name="drug_warningTherehold_label">Alert therehold</string>
|
||||
<string name="drug_alertTherehold_label">Critical threhold</string>
|
||||
<string name="button_keyboard">"Use the keyboard"</string>
|
||||
<string name="detail_view">Detail view</string>
|
||||
<string name="scan_action">Scan a drug barcode</string>
|
||||
|
@ -56,7 +56,7 @@
|
|||
<string name="neutral_face">neutral face</string>
|
||||
<string name="unhappy_face">unhappy face</string>
|
||||
<string name="slide8_desc">Drug info</string>
|
||||
<string name="medicament_info">Drug info screenshot</string>
|
||||
<string name="drug_info">Drug info screenshot</string>
|
||||
<string name="slide9_desc">Tunables informations</string>
|
||||
<string name="tunables">Tunables</string>
|
||||
<string name="slide10_desc">Take to 0 to suspend treatment</string>
|
||||
|
@ -69,8 +69,8 @@
|
|||
<string name="start">Start</string>
|
||||
<string name="zero" translatable="false">0</string>
|
||||
<string name="add_button">Add new drug in list</string>
|
||||
<string name="nom_m_dicament">Drug Name</string>
|
||||
<string name="icone_de_stock">Stock Icon</string>
|
||||
<string name="drugName">Drug Name</string>
|
||||
<string name="stockIcon">Stock Icon</string>
|
||||
<string name="cip13_goes_here">cip13 goes here</string>
|
||||
<string name="Date">Monday January 1st 2001</string>
|
||||
<string name="Value">Value</string>
|
||||
|
|
Loading…
Reference in a new issue