translate french bits in the splitwise example
This commit is contained in:
@@ -7,31 +7,31 @@ INSERT INTO group_member(group_id, name)
|
||||
SELECT $id, :new_member_name WHERE :new_member_name IS NOT NULL;
|
||||
|
||||
-- List of members of the group
|
||||
SELECT 'list' as component, 'Membres' as title;
|
||||
SELECT 'list' as component, 'Members' as title;
|
||||
SELECT name AS title FROM group_member WHERE group_id = $id;
|
||||
|
||||
-- Form to add a new member to the group
|
||||
SELECT 'form' as component, 'Ajouter un membre au groupe' as validate;
|
||||
SELECT 'Nom du membre' AS 'label', 'new_member_name' AS name;
|
||||
SELECT 'form' as component, 'Add a member to the group' as validate;
|
||||
SELECT 'Member Name' AS 'label', 'new_member_name' AS name;
|
||||
|
||||
SELECT 'title' as component, 'Dépenses' as contents
|
||||
SELECT 'title' as component, 'Expenses' as contents
|
||||
|
||||
-- Form to add an expense
|
||||
SELECT 'form' as component, 'Ajouter une dépense' as title, 'Ajouter' as validate;
|
||||
SELECT 'form' as component, 'Add an expense' as title, 'Add' as validate;
|
||||
SELECT 'Description' AS name;
|
||||
SELECT 'Montant' AS name, 'number' AS type;
|
||||
SELECT 'Dépensé par' AS name, 'select' as type,
|
||||
SELECT 'Amount' AS name, 'number' AS type;
|
||||
SELECT 'Spent By' AS name, 'select' as type,
|
||||
json_group_array(json_object("label", name, "value", id)) as options
|
||||
FROM group_member WHERE group_id = $id;
|
||||
|
||||
-- Insert the expense posted by the form into the database
|
||||
INSERT INTO expense(spent_by, name, amount)
|
||||
SELECT :"Dépensé par", :Description, :Montant WHERE :Montant IS NOT NULL;
|
||||
SELECT :"Spent By", :Description, :Amount WHERE :Amount IS NOT NULL;
|
||||
|
||||
-- List of expenses of the group
|
||||
SELECT 'card' as component, 'Dépenses' as title;
|
||||
SELECT 'card' as component, 'Expenses' as title;
|
||||
SELECT expense.name as title,
|
||||
'Par ' || group_member.name || ', le ' || expense.date as description,
|
||||
'By ' || group_member.name || ', on ' || expense.date as description,
|
||||
expense.amount || ' €' as footer,
|
||||
CASE
|
||||
WHEN expense.amount > 100 THEN 'red'
|
||||
@@ -43,6 +43,6 @@ FROM expense
|
||||
WHERE group_member.group_id = $id;
|
||||
|
||||
-- Show the positive and negative debts of each member
|
||||
SELECT 'chart' AS component, 'Dette par personne' AS title, 'bar' AS type, TRUE AS horizontal;
|
||||
SELECT 'chart' AS component, 'Debts by Person' AS title, 'bar' AS type, TRUE AS horizontal;
|
||||
SELECT member_name AS label, is_owed AS value FROM individual_debts
|
||||
WHERE group_id = $id ORDER BY is_owed DESC;
|
||||
WHERE group_id = $id ORDER BY is_owed DESC;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
|
||||
-- Simple form to create a shared expense account
|
||||
SELECT 'form' as component,
|
||||
'Nouveau compte partagé' as title,
|
||||
'Créer le compte de dépenses partagé !' as validate;
|
||||
SELECT 'Nom du compte' AS label,
|
||||
'New shared expense account' as title,
|
||||
'Create the shared expense account!' as validate;
|
||||
SELECT 'Account Name' AS label,
|
||||
'shared_expense_name' AS name;
|
||||
|
||||
-- Insert the shared expense account posted by the form into the database
|
||||
@@ -16,4 +15,4 @@ WHERE :shared_expense_name IS NOT NULL;
|
||||
SELECT 'list' as component;
|
||||
SELECT name AS title,
|
||||
'group.sql?id=' || id AS link
|
||||
FROM expense_group;
|
||||
FROM expense_group;
|
||||
|
||||
@@ -10,10 +10,7 @@ CREATE TABLE group_member(
|
||||
CREATE TABLE expense(
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
spent_by INTEGER REFERENCES group_member(id),
|
||||
-- identifiant du membre qui a fait la dépense
|
||||
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
-- date et heure de la dépense
|
||||
name TEXT,
|
||||
-- intitulé
|
||||
amount DECIMAL -- montant en euros
|
||||
amount DECIMAL
|
||||
);
|
||||
Reference in New Issue
Block a user