Mattias Bodlund 1 month ago
parent
commit
95446aa91b
27 changed files with 82 additions and 42 deletions
  1. +33
    -11
      AGENTS.md
  2. +19
    -1
      app/helpers/game_helper.rb
  3. +1
    -1
      config/locales/cs.yml
  4. +1
    -1
      config/locales/da.yml
  5. +1
    -1
      config/locales/de.yml
  6. +1
    -1
      config/locales/en.yml
  7. +1
    -1
      config/locales/es.yml
  8. +1
    -1
      config/locales/fi.yml
  9. +1
    -1
      config/locales/fr-CA.yml
  10. +1
    -1
      config/locales/fr.yml
  11. +1
    -1
      config/locales/hr.yml
  12. +1
    -1
      config/locales/hu.yml
  13. +1
    -1
      config/locales/it.yml
  14. +1
    -1
      config/locales/ja.yml
  15. +1
    -1
      config/locales/ko.yml
  16. +1
    -1
      config/locales/nb.yml
  17. +1
    -1
      config/locales/nl.yml
  18. +1
    -1
      config/locales/pl.yml
  19. +1
    -1
      config/locales/pt.yml
  20. +1
    -1
      config/locales/ro.yml
  21. +1
    -1
      config/locales/sk.yml
  22. +1
    -1
      config/locales/sl.yml
  23. +1
    -1
      config/locales/sr.yml
  24. +1
    -1
      config/locales/sv.yml
  25. +1
    -1
      config/locales/uk.yml
  26. +1
    -1
      config/locales/zh.yml
  27. +6
    -6
      config/question_scores.json

+ 33
- 11
AGENTS.md View File

@ -7,11 +7,12 @@ This project is a Ruby on Rails application developed for the IKEA Foundation. I
- **Multi-lingual Support:** Uses the `mobility` gem for translating content into numerous languages. Supported locales include: en, zh, hr, cs, da, nl, fi, fr, fr-CA, de, hu, it, ja, ko, nb, pl, pt, ro, sr, sk, sl, es, sv, uk. - **Multi-lingual Support:** Uses the `mobility` gem for translating content into numerous languages. Supported locales include: en, zh, hr, cs, da, nl, fi, fr, fr-CA, de, hu, it, ja, ko, nb, pl, pt, ro, sr, sk, sl, es, sv, uk.
- **Hierarchical Content Management:** A "Node" system (using `ancestry`) for managing pages, stages, and interactive elements. - **Hierarchical Content Management:** A "Node" system (using `ancestry`) for managing pages, stages, and interactive elements.
- **Player Progression:** Tracks player progress, scores, and decisions across different stages in the `Player` model's `progress` JSONB field. - **Player Progression:** Tracks player progress, scores, and decisions across different stages in the `Player` model's `progress` JSONB field.
- **Interactive Game Flow:** Managed by `StagesController`, featuring:
- **Flip:** Randomly determines if a stage is a "chance" or "choice" event.
- **Reveal:** Displays the specific content for the flipped event.
- **Pick:** For "chance", randomly samples an outcome; for "choice", records the player's selection.
- **Result:** Shows the outcome (e.g., best, bad, good, game_over) based on the previous step.
- **Interactive Game Flow:** Managed by `GameController`, featuring:
- **Stage:** Presents a stage's answer nodes (`good_answer`, `bad_answer`, or `chance`).
- **Answer:** Records the player's selection; for `chance`, an outcome child is sampled.
- **Stage result:** Shows the outcome node and applies its score.
- **Last save / Results:** Final compost-vs-landfill choice, then the scored results screen.
- **Scoring:** Answer scores live in `config/question_scores.json`, not in the database. See below.
- **Admin Interface:** A backend for managing nodes, assets (Active Storage), users, and translations. - **Admin Interface:** A backend for managing nodes, assets (Active Storage), users, and translations.
- **Search:** `pg_search` integration for content discovery. - **Search:** `pg_search` integration for content discovery.
@ -27,17 +28,38 @@ This project is a Ruby on Rails application developed for the IKEA Foundation. I
- `Node`: The central content model. Templates are hierarchy-dependent: - `Node`: The central content model. Templates are hierarchy-dependent:
- **Root (Depth 0):** `start` - **Root (Depth 0):** `start`
- **Level 1:** `stage`
- **Level 2:** `choice`, `chance`
- **Level 3 (under choice/chance):** `best`, `bad`, `good`, `game_over`
- `Player`: Tracks session state, `progress`, `current_stage`, and `score`.
- **Level 1:** `facts`, `intro`, `stage`, `last_save`, `results`
- **Level 2 (answers under a stage):** `good_answer`, `bad_answer`, `chance`
- **Level 3 (outcomes under a chance):** `good_answer`, `bad_answer`
- `Player`: Tracks session state, `progress` (per-stage `answer_id` / `result_id`), the
cumulative `score`, and the `scores` hash keyed by `food_waste`, `emissions`, `income`.
- `Asset` & `Attachment`: Handles media and its contextual content (body text, styling) associated with nodes. - `Asset` & `Attachment`: Handles media and its contextual content (body text, styling) associated with nodes.
- `User`: Admin authentication and roles. - `User`: Admin authentication and roles.
## Scoring
Scores are **not** stored on nodes. `config/question_scores.json` holds them, and
`GameController#score_entry_for` maps a node to its entry **by `position`**:
- `stages[stage_index - 1].answers[answer.position - 1]` for a normal answer.
- For a `chance` outcome, the parent chance node's entry is looked up the same way and
the outcome is read from its `outcomes[child.position - 1]`.
Each entry has an `overall` value (feeds `player.score` and the result band) and an
`impact` hash of `food_waste` / `emissions` / `income` deltas (feed the per-category
tones in `GameHelper`). `type` and `early_exit` are documentation only — nothing reads them.
**Gotcha:** because the mapping is positional, the JSON must mirror the node tree exactly.
A `chance` answer needs a `{"type": "chance", "outcomes": [...]}` entry at its position; if
it is flattened into sibling entries instead, the outcome lookup silently returns `nil` and
that branch scores nothing. Verify with a `bin/rails runner` walk of the tree after editing.
## Project Structure ## Project Structure
- `app/controllers/admin/`: Admin backend logic. - `app/controllers/admin/`: Admin backend logic.
- `app/controllers/stages_controller.rb`: Main game loop (Flip -> Reveal -> Pick -> Result).
- `app/controllers/site_controller.rb`: Content delivery for standard pages.
- `app/controllers/game_controller.rb`: Main game loop (stage -> answer -> result -> results).
- `app/controllers/api/`: JSON endpoints (see `docs/leaderboard_api.md`).
- `app/helpers/game_helper.rb`: Result bands and per-impact tone thresholds.
- `app/models/concerns/`: Shared logic for ancestry, attachments, and tags. - `app/models/concerns/`: Shared logic for ancestry, attachments, and tags.
- `config/locales/`: YAML translation files. - `config/locales/`: YAML translation files.
- `config/question_scores.json`: Answer scoring table.

+ 19
- 1
app/helpers/game_helper.rb View File

@ -46,13 +46,31 @@ module GameHelper
RESULT_BANDS = [ [ 8, :best ], [ 5, :balanced ], [ 0, :worst ] ].freeze RESULT_BANDS = [ [ 8, :best ], [ 5, :balanced ], [ 0, :worst ] ].freeze
BAND_RANK = { worst: 1, balanced: 2, best: 3 }.freeze
def result_state(player) def result_state(player)
if (answer_id = player.last_save_answer_id) if (answer_id = player.last_save_answer_id)
return last_save_result_state(answer_id) return last_save_result_state(answer_id)
end end
overall = player.score.to_i overall = player.score.to_i
RESULT_BANDS.find { |threshold, _| overall >= threshold }.last
band = RESULT_BANDS.find { |threshold, _| overall >= threshold }.last
# The headline may never read worse than the three impact texts below it:
# green metrics with a low overall would otherwise land on "close call".
# The floor only lifts the band, never lowers it.
floor = tone_floor(player)
BAND_RANK[floor] > BAND_RANK[band] ? floor : band
end
# Lowest band the impact texts allow, derived from the same tones they use.
def tone_floor(player)
tones = Player::SCORE_KEYS.map { |category| impact_tone(player, category.to_sym) }
return :best if tones.count(:positive) == tones.size
return :balanced if tones.none?(:negative)
:worst
end end


+ 1
- 1
config/locales/cs.yml View File

@ -67,7 +67,7 @@ cs:
income: income:
label: Příjmy label: Příjmy
positive: Rajče jsi prodal/a na místním trhu, což znamená, že sis vydělal/a nějaké peníze! positive: Rajče jsi prodal/a na místním trhu, což znamená, že sis vydělal/a nějaké peníze!
neutral: Rajče jsi prodal/a na místním trhu, což znamená, že sis vydělal/a nějaké peníze!
neutral: Rajče se prodalo, ale tentokrát z toho nebyl velký zisk.
negative: Nebylo to snadné, ale podařilo se ti rajče prodat, což znamená, že sis vydělal/a nějaké peníze. negative: Nebylo to snadné, ale podařilo se ti rajče prodat, což znamená, že sis vydělal/a nějaké peníze.
early_exit: early_exit:
positive: Rajče ti nevydělalo žádné peníze – jeho prodej by mohl být obtížný, i kdyby se nezkazilo. positive: Rajče ti nevydělalo žádné peníze – jeho prodej by mohl být obtížný, i kdyby se nezkazilo.


+ 1
- 1
config/locales/da.yml View File

@ -69,7 +69,7 @@ da:
income: income:
label: Indkomst label: Indkomst
positive: Du solgte din tomat lokalt, så du tjente lidt penge! positive: Du solgte din tomat lokalt, så du tjente lidt penge!
neutral: Du solgte din tomat lokalt, så du tjente lidt penge!
neutral: Din tomat blev solgt, men der var ikke meget profit denne gang.
negative: Det var ikke let, men du fik solgt din tomat, så du tjente lidt penge. negative: Det var ikke let, men du fik solgt din tomat, så du tjente lidt penge.
early_exit: early_exit:
positive: Du tjente ingen penge på din tomat – og selv hvis din tomat ikke var blevet til madspild, kunne det have været svært at sælge den. positive: Du tjente ingen penge på din tomat – og selv hvis din tomat ikke var blevet til madspild, kunne det have været svært at sælge den.


+ 1
- 1
config/locales/de.yml View File

@ -68,7 +68,7 @@ de:
income: income:
label: Einkommen label: Einkommen
positive: Du hast deine Tomate lokal verkauft, was bedeutet, dass du etwas Geld verdient hast! positive: Du hast deine Tomate lokal verkauft, was bedeutet, dass du etwas Geld verdient hast!
neutral: Du hast deine Tomate lokal verkauft, was bedeutet, dass du etwas Geld verdient hast!
neutral: Deine Tomate wurde verkauft, aber diesmal blieb nicht viel Gewinn übrig.
negative: Es war nicht einfach, aber du hast es geschafft, deine Tomate zu verkaufen, was bedeutet, dass du etwas Geld verdient hast. negative: Es war nicht einfach, aber du hast es geschafft, deine Tomate zu verkaufen, was bedeutet, dass du etwas Geld verdient hast.
early_exit: early_exit:
positive: Du hast kein Geld für deine Tomate verdient – und selbst wenn deine Tomate nicht verdorben wäre, wäre es schwierig gewesen, sie zu verkaufen. positive: Du hast kein Geld für deine Tomate verdient – und selbst wenn deine Tomate nicht verdorben wäre, wäre es schwierig gewesen, sie zu verkaufen.


+ 1
- 1
config/locales/en.yml View File

@ -93,7 +93,7 @@ en:
income: income:
label: Income label: Income
positive: You sold your tomato locally, which means you earned some money! positive: You sold your tomato locally, which means you earned some money!
neutral: You sold your tomato locally, which means you earned some money!
neutral: Your tomato was sold, but there wasn't much profit this time.
negative: It wasn't easy, but you managed to sell your tomato, which means negative: It wasn't easy, but you managed to sell your tomato, which means
you earned some money. you earned some money.
early_exit: early_exit:


+ 1
- 1
config/locales/es.yml View File

@ -68,7 +68,7 @@ es:
income: income:
label: Ingresos label: Ingresos
positive: Has vendido el tomate en tu zona, lo que significa que has ganado algo de dinero. positive: Has vendido el tomate en tu zona, lo que significa que has ganado algo de dinero.
neutral: Has vendido el tomate en tu zona, lo que significa que has ganado algo de dinero.
neutral: Has vendido el tomate, pero esta vez no has sacado mucho beneficio.
negative: No ha sido fácil, pero has conseguido vender el tomate, lo que significa que has ganado algo de dinero. negative: No ha sido fácil, pero has conseguido vender el tomate, lo que significa que has ganado algo de dinero.
early_exit: early_exit:
positive: No has ganado nada con el tomate, y aunque no se hubiera echado a perder, venderlo podría haber sido complicado. positive: No has ganado nada con el tomate, y aunque no se hubiera echado a perder, venderlo podría haber sido complicado.


+ 1
- 1
config/locales/fi.yml View File

@ -68,7 +68,7 @@ fi:
income: income:
label: Tulot label: Tulot
positive: Myit tomaatin paikallisesti, eli ansaitsit hieman rahaa! positive: Myit tomaatin paikallisesti, eli ansaitsit hieman rahaa!
neutral: Myit tomaatin paikallisesti, eli ansaitsit hieman rahaa!
neutral: Myit tomaatin, mutta tällä kertaa siitä ei jäänyt paljon voittoa.
negative: Se ei ollut helppoa, mutta sait tomaatin myytyä ja ansaitsit hieman rahaa. negative: Se ei ollut helppoa, mutta sait tomaatin myytyä ja ansaitsit hieman rahaa.
early_exit: early_exit:
positive: Et ansainnut rahaa tomaatillasi – ja vaikka tomaattisi ei olisi päätynyt jätteeksi, sen myyminen olisi saattanut olla vaikeaa. positive: Et ansainnut rahaa tomaatillasi – ja vaikka tomaattisi ei olisi päätynyt jätteeksi, sen myyminen olisi saattanut olla vaikeaa.


+ 1
- 1
config/locales/fr-CA.yml View File

@ -68,7 +68,7 @@ fr-CA:
income: income:
label: Revenus label: Revenus
positive: Vous avez vendu votre tomate localement, ce qui signifie que vous avez gagné un peu d’argent ! positive: Vous avez vendu votre tomate localement, ce qui signifie que vous avez gagné un peu d’argent !
neutral: Vous avez vendu votre tomate localement, ce qui signifie que vous avez gagné un peu d’argent !
neutral: Votre tomate a été vendue, mais elle n’a pas rapporté beaucoup cette fois-ci.
negative: Ce n’était pas facile, mais vous avez réussi à vendre votre tomate, ce qui signifie que vous avez gagné un peu d’argent. negative: Ce n’était pas facile, mais vous avez réussi à vendre votre tomate, ce qui signifie que vous avez gagné un peu d’argent.
early_exit: early_exit:
positive: Vous n’avez pas gagné d’argent avec votre tomate ; et même si votre tomate n’avait pas été gaspillée, il aurait pu être difficile de la vendre. positive: Vous n’avez pas gagné d’argent avec votre tomate ; et même si votre tomate n’avait pas été gaspillée, il aurait pu être difficile de la vendre.


+ 1
- 1
config/locales/fr.yml View File

@ -67,7 +67,7 @@ fr:
income: income:
label: Revenus label: Revenus
positive: Vous avez vendu votre tomate localement, ce qui signifie que vous avez gagné un peu d’argent ! positive: Vous avez vendu votre tomate localement, ce qui signifie que vous avez gagné un peu d’argent !
neutral: Vous avez vendu votre tomate localement, ce qui signifie que vous avez gagné un peu d’argent !
neutral: Votre tomate a été vendue, mais elle n’a pas rapporté beaucoup cette fois-ci.
negative: Ce n’était pas facile, mais vous avez réussi à vendre votre tomate, ce qui signifie que vous avez gagné un peu d’argent. negative: Ce n’était pas facile, mais vous avez réussi à vendre votre tomate, ce qui signifie que vous avez gagné un peu d’argent.
early_exit: early_exit:
positive: Vous n’avez pas gagné d’argent avec votre tomate ; et même si votre tomate n’avait pas été gaspillée, il aurait pu être difficile de la vendre. positive: Vous n’avez pas gagné d’argent avec votre tomate ; et même si votre tomate n’avait pas été gaspillée, il aurait pu être difficile de la vendre.


+ 1
- 1
config/locales/hr.yml View File

@ -68,7 +68,7 @@ hr:
income: income:
label: Prihodi label: Prihodi
positive: Prodao/la si svoju rajčicu lokalno, što znači da si zaradio/la nešto novca! positive: Prodao/la si svoju rajčicu lokalno, što znači da si zaradio/la nešto novca!
neutral: Prodao/la si svoju rajčicu lokalno, što znači da si zaradio/la nešto novca!
neutral: Rajčica je prodana, ali ovaj put na njoj nisi puno zaradio/la.
negative: Nije bilo lako, ali uspio/la si prodati svoju rajčicu, što znači da si zaradio/la nešto novca. negative: Nije bilo lako, ali uspio/la si prodati svoju rajčicu, što znači da si zaradio/la nešto novca.
early_exit: early_exit:
positive: Nisi zaradio/la ništa na svojoj rajčici – a čak i da tvoja rajčica nije završila kao otpad, možda bi je bilo teško prodati. positive: Nisi zaradio/la ništa na svojoj rajčici – a čak i da tvoja rajčica nije završila kao otpad, možda bi je bilo teško prodati.


+ 1
- 1
config/locales/hu.yml View File

@ -70,7 +70,7 @@ hu:
income: income:
label: Jövedelem label: Jövedelem
positive: Helyben adtad el a paradicsomodat, így szereztél egy kis pénzt. positive: Helyben adtad el a paradicsomodat, így szereztél egy kis pénzt.
neutral: Helyben adtad el a paradicsomodat, így szereztél egy kis pénzt.
neutral: A paradicsomod elkelt, de ezúttal nem sok haszon származott belőle.
negative: Nem volt könnyű, de sikerült eladnod a paradicsomodat, így szereztél egy kis pénzt. negative: Nem volt könnyű, de sikerült eladnod a paradicsomodat, így szereztél egy kis pénzt.
early_exit: early_exit:
positive: Nem kerestél pénzt a paradicsomoddal, és még ha nem is veszett volna kárba, akkor is nehezen tudtad volna eladni. positive: Nem kerestél pénzt a paradicsomoddal, és még ha nem is veszett volna kárba, akkor is nehezen tudtad volna eladni.


+ 1
- 1
config/locales/it.yml View File

@ -68,7 +68,7 @@ it:
income: income:
label: Guadagno label: Guadagno
positive: Hai venduto il tuo pomodoro a livello locale, quindi hai guadagnato un po' di denaro! positive: Hai venduto il tuo pomodoro a livello locale, quindi hai guadagnato un po' di denaro!
neutral: Hai venduto il tuo pomodoro a livello locale, quindi hai guadagnato un po' di denaro!
neutral: Il tuo pomodoro è stato venduto, ma questa volta il guadagno è stato scarso.
negative: "Non è stato facile, ma ce l'hai fatta: hai venduto il tuo pomodoro e quindi hai guadagnato un po' di denaro." negative: "Non è stato facile, ma ce l'hai fatta: hai venduto il tuo pomodoro e quindi hai guadagnato un po' di denaro."
early_exit: early_exit:
positive: Il tuo pomodoro non ti ha fatto guadagnare nulla e, anche se non si fosse rovinato, venderlo sarebbe stato comunque difficile. positive: Il tuo pomodoro non ti ha fatto guadagnare nulla e, anche se non si fosse rovinato, venderlo sarebbe stato comunque difficile.


+ 1
- 1
config/locales/ja.yml View File

@ -68,7 +68,7 @@ ja:
income: income:
label: 収入 label: 収入
positive: 地元でトマトを販売して、収入を得ることができました! positive: 地元でトマトを販売して、収入を得ることができました!
neutral: 地元でトマトを販売して、収入を得ることができました!
neutral: トマトは売れましたが、今回はあまり利益になりませんでした。
negative: 簡単ではありませんでしたが、トマトを販売して、収入を得ることができました。 negative: 簡単ではありませんでしたが、トマトを販売して、収入を得ることができました。
early_exit: early_exit:
positive: トマトで収入を得ることはできませんでした。たとえトマトがムダにならなかったとしても、販売するのは難しかったかもしれません。 positive: トマトで収入を得ることはできませんでした。たとえトマトがムダにならなかったとしても、販売するのは難しかったかもしれません。


+ 1
- 1
config/locales/ko.yml View File

@ -68,7 +68,7 @@ ko:
income: income:
label: 소득 label: 소득
positive: 토마토를 지역에서 판매해 수익을 올렸어요! positive: 토마토를 지역에서 판매해 수익을 올렸어요!
neutral: 토마토를 지역에서 판매해 수익을 올렸어요!
neutral: 토마토는 팔렸지만, 이번에는 수익이 많지 않았어요.
negative: 쉽지는 않았지만 토마토를 판매해 수익을 올렸어요. negative: 쉽지는 않았지만 토마토를 판매해 수익을 올렸어요.
early_exit: early_exit:
positive: 토마토로 수익을 올리지 못했어요. 토마토가 버려지지 않았더라도 판매하기는 어려웠을 수도 있어요. positive: 토마토로 수익을 올리지 못했어요. 토마토가 버려지지 않았더라도 판매하기는 어려웠을 수도 있어요.


+ 1
- 1
config/locales/nb.yml View File

@ -69,7 +69,7 @@ nb:
income: income:
label: Inntekt label: Inntekt
positive: Du solgte tomaten din lokalt, noe som betyr at du tjente litt penger! positive: Du solgte tomaten din lokalt, noe som betyr at du tjente litt penger!
neutral: Du solgte tomaten din lokalt, noe som betyr at du tjente litt penger!
neutral: Tomaten din ble solgt, men det ble ikke mye fortjeneste denne gangen.
negative: Det var ikke enkelt, men du klarte å selge tomaten din, noe som betyr at du tjente litt penger. negative: Det var ikke enkelt, men du klarte å selge tomaten din, noe som betyr at du tjente litt penger.
early_exit: early_exit:
positive: Du tjente ikke penger på tomaten din – og selv om tomaten din ikke hadde gått til spille, kunne det ha vært vanskelig å selge den. positive: Du tjente ikke penger på tomaten din – og selv om tomaten din ikke hadde gått til spille, kunne det ha vært vanskelig å selge den.


+ 1
- 1
config/locales/nl.yml View File

@ -68,7 +68,7 @@ nl:
income: income:
label: Inkomen label: Inkomen
positive: Je hebt je tomaat lokaal verkocht, dus je hebt wat geld verdiend! positive: Je hebt je tomaat lokaal verkocht, dus je hebt wat geld verdiend!
neutral: Je hebt je tomaat lokaal verkocht, dus je hebt wat geld verdiend!
neutral: Je tomaat is verkocht, maar er zat deze keer weinig winst in.
negative: Het was niet makkelijk, maar je hebt je tomaat toch weten te verkopen, dus je hebt wat geld verdiend. negative: Het was niet makkelijk, maar je hebt je tomaat toch weten te verkopen, dus je hebt wat geld verdiend.
early_exit: early_exit:
positive: Je hebt geen geld verdiend aan je tomaat – en zelfs als je tomaat niet was verspild, was het misschien lastig geweest om hem te verkopen. positive: Je hebt geen geld verdiend aan je tomaat – en zelfs als je tomaat niet was verspild, was het misschien lastig geweest om hem te verkopen.


+ 1
- 1
config/locales/pl.yml View File

@ -68,7 +68,7 @@ pl:
income: income:
label: Przychód label: Przychód
positive: Twój pomidor został sprzedany na lokalnym rynku, co oznacza, że udało Ci się na nim zarobić! positive: Twój pomidor został sprzedany na lokalnym rynku, co oznacza, że udało Ci się na nim zarobić!
neutral: Twój pomidor został sprzedany na lokalnym rynku, co oznacza, że udało Ci się na nim zarobić!
neutral: Twój pomidor został sprzedany, ale tym razem zysk był niewielki.
negative: Droga była wyboista, ale pomidor został sprzedany i udało Ci się na nim zarobić. negative: Droga była wyboista, ale pomidor został sprzedany i udało Ci się na nim zarobić.
early_exit: early_exit:
positive: Nie udało Ci się zarobić na pomidorze – nawet gdyby nie wylądował w koszu, znalezienie na niego chętnych mogło być trudne. positive: Nie udało Ci się zarobić na pomidorze – nawet gdyby nie wylądował w koszu, znalezienie na niego chętnych mogło być trudne.


+ 1
- 1
config/locales/pt.yml View File

@ -68,7 +68,7 @@ pt:
income: income:
label: Rendimento label: Rendimento
positive: Vendeste o tomate localmente, por isso ganhaste algum dinheiro. positive: Vendeste o tomate localmente, por isso ganhaste algum dinheiro.
neutral: Vendeste o tomate localmente, por isso ganhaste algum dinheiro.
neutral: O teu tomate foi vendido, mas desta vez não deu muito lucro.
negative: Não foi fácil, mas conseguiste vender o tomate, o que significa que ganhaste algum dinheiro. negative: Não foi fácil, mas conseguiste vender o tomate, o que significa que ganhaste algum dinheiro.
early_exit: early_exit:
positive: Não ganhaste dinheiro com o tomate e, mesmo que não tivesse acabado como resíduo, vendê-lo teria sido difícil. positive: Não ganhaste dinheiro com o tomate e, mesmo que não tivesse acabado como resíduo, vendê-lo teria sido difícil.


+ 1
- 1
config/locales/ro.yml View File

@ -69,7 +69,7 @@ ro:
income: income:
label: Venituri label: Venituri
positive: Ai vândut roșia pe piața locală, ceea ce înseamnă că ai câștigat niște bani positive: Ai vândut roșia pe piața locală, ceea ce înseamnă că ai câștigat niște bani
neutral: Ai vândut roșia pe piața locală, ceea ce înseamnă că ai câștigat niște bani
neutral: Roșia ta a fost vândută, dar de data aceasta nu ai câștigat mare lucru.
negative: Nu a fost ușor, dar ai reușit să vinzi roșia, ceea ce înseamnă că ai câștigat niște bani. negative: Nu a fost ușor, dar ai reușit să vinzi roșia, ceea ce înseamnă că ai câștigat niște bani.
early_exit: early_exit:
positive: Nu ai câștigat niciun ban cu roșia ta – și chiar dacă nu s-ar fi alterat, ar fi fost probabil dificil să o vinzi. positive: Nu ai câștigat niciun ban cu roșia ta – și chiar dacă nu s-ar fi alterat, ar fi fost probabil dificil să o vinzi.


+ 1
- 1
config/locales/sk.yml View File

@ -68,7 +68,7 @@ sk:
income: income:
label: Príjem label: Príjem
positive: Paradajku si predal/-a na miestnom trhu, takže si aj zarobil/-a nejaké peniaze! positive: Paradajku si predal/-a na miestnom trhu, takže si aj zarobil/-a nejaké peniaze!
neutral: Paradajku si predal/-a na miestnom trhu, takže si aj zarobil/-a nejaké peniaze!
neutral: Paradajku sa podarilo predať, ale tentoraz z toho nebol veľký zisk.
negative: Nebolo to ľahké, ale paradajku sa ti podarilo predať, takže si aj zarobil/-a nejaké peniaze. negative: Nebolo to ľahké, ale paradajku sa ti podarilo predať, takže si aj zarobil/-a nejaké peniaze.
early_exit: early_exit:
positive: Za svoju paradajku si nezarobil/-a žiadne peniaze – a aj keby paradajka nebola skončila ako odpad, mohlo byť ťažké predať ju. positive: Za svoju paradajku si nezarobil/-a žiadne peniaze – a aj keby paradajka nebola skončila ako odpad, mohlo byť ťažké predať ju.


+ 1
- 1
config/locales/sl.yml View File

@ -68,7 +68,7 @@ sl:
income: income:
label: Prihodki label: Prihodki
positive: Paradižnik si prodal/-a na lokalnem trgu, kar pomeni, da si zaslužil/-a nekaj denarja! positive: Paradižnik si prodal/-a na lokalnem trgu, kar pomeni, da si zaslužil/-a nekaj denarja!
neutral: Paradižnik si prodal/-a na lokalnem trgu, kar pomeni, da si zaslužil/-a nekaj denarja!
neutral: Paradižnik je bil prodan, a tokrat zaslužek ni bil velik.
negative: Ni bilo enostavno, ampak ti je uspelo prodati paradižnik, kar pomeni, da si zaslužil/-a nekaj denarja. negative: Ni bilo enostavno, ampak ti je uspelo prodati paradižnik, kar pomeni, da si zaslužil/-a nekaj denarja.
early_exit: early_exit:
positive: S svojim paradižnikom nisi zaslužil/-a nič denarja – in tudi če se paradižnik ne bi pokvaril, bi ga bilo težko prodati. positive: S svojim paradižnikom nisi zaslužil/-a nič denarja – in tudi če se paradižnik ne bi pokvaril, bi ga bilo težko prodati.


+ 1
- 1
config/locales/sr.yml View File

@ -68,7 +68,7 @@ sr:
income: income:
label: Prihod label: Prihod
positive: Prodao/la si svoj paradajz lokalno, što znači da si zaradio/la novac! positive: Prodao/la si svoj paradajz lokalno, što znači da si zaradio/la novac!
neutral: Prodao/la si svoj paradajz lokalno, što znači da si zaradio/la novac!
neutral: Tvoj paradajz je prodat, ali ovog puta zarada nije bila velika.
negative: Nije bilo lako, ali uspeo/la si da prodaš svoj paradajz, što znači da si zaradio/la nešto novca. negative: Nije bilo lako, ali uspeo/la si da prodaš svoj paradajz, što znači da si zaradio/la nešto novca.
early_exit: early_exit:
positive: Nisi zaradio/la novac za svoj paradajz – a čak i da ti paradajz nije propao, prodaja bi mogla teško da ide. positive: Nisi zaradio/la novac za svoj paradajz – a čak i da ti paradajz nije propao, prodaja bi mogla teško da ide.


+ 1
- 1
config/locales/sv.yml View File

@ -68,7 +68,7 @@ sv:
income: income:
label: Inkomst label: Inkomst
positive: Du sålde din tomat lokalt, vilket innebär att du tjänade lite pengar! positive: Du sålde din tomat lokalt, vilket innebär att du tjänade lite pengar!
neutral: Du sålde din tomat lokalt, vilket innebär att du tjänade lite pengar!
neutral: Din tomat såldes, men det blev inte mycket vinst den här gången.
negative: Det var inte lätt, men du lyckades sälja din tomat, vilket innebär att du tjänade lite pengar. negative: Det var inte lätt, men du lyckades sälja din tomat, vilket innebär att du tjänade lite pengar.
early_exit: early_exit:
positive: Du tjänade inga pengar på din tomat – och även om din tomat inte hade blivit förstörd, hade det kanske varit svårt att sälja den. positive: Du tjänade inga pengar på din tomat – och även om din tomat inte hade blivit förstörd, hade det kanske varit svårt att sälja den.


+ 1
- 1
config/locales/uk.yml View File

@ -69,7 +69,7 @@ uk:
income: income:
label: Дохід label: Дохід
positive: Ви продали помідор на місцевому ринку й заробили трохи грошей! positive: Ви продали помідор на місцевому ринку й заробили трохи грошей!
neutral: Ви продали помідор на місцевому ринку й заробили трохи грошей!
neutral: Ви продали помідор, але цього разу прибуток був невеликий.
negative: Це було нелегко, але вам вдалося продати свій помідор, щоб заробити трохи грошей. negative: Це було нелегко, але вам вдалося продати свій помідор, щоб заробити трохи грошей.
early_exit: early_exit:
positive: Ви нічого не заробили на своєму помідорі — і навіть якби він не зіпсувався, продати його, напевно, було б непросто. positive: Ви нічого не заробили на своєму помідорі — і навіть якби він не зіпсувався, продати його, напевно, було б непросто.


+ 1
- 1
config/locales/zh.yml View File

@ -68,7 +68,7 @@ zh:
income: income:
label: 收入 label: 收入
positive: 你把番茄卖给了当地商家,这意味着你赚了点钱! positive: 你把番茄卖给了当地商家,这意味着你赚了点钱!
neutral: 你把番茄卖给了当地商家,这意味着你赚了点钱!
neutral: 番茄卖出去了,但这次没赚到多少钱。
negative: 虽然不容易,但你成功卖掉了番茄,这意味着你赚了一些钱。 negative: 虽然不容易,但你成功卖掉了番茄,这意味着你赚了一些钱。
early_exit: early_exit:
positive: 你的番茄没给你带来任何收入——即使你的番茄没有被浪费掉,卖出去也可能很困难。 positive: 你的番茄没给你带来任何收入——即使你的番茄没有被浪费掉,卖出去也可能很困难。


+ 6
- 6
config/question_scores.json View File

@ -24,7 +24,7 @@
{ {
"type": "good_answer", "type": "good_answer",
"overall": 1, "overall": 1,
"impact": { "food_waste": 1, "emissions": 1, "income": 0 }
"impact": { "food_waste": 1, "emissions": 2, "income": 0 }
} }
] ]
} }
@ -41,7 +41,7 @@
{ {
"type": "bad_answer", "type": "bad_answer",
"overall": 0, "overall": 0,
"impact": { "food_waste": -1, "emissions": -1, "income": 0 }
"impact": { "food_waste": -1, "emissions": -2, "income": 0 }
}, },
{ {
"type": "chance", "type": "chance",
@ -80,7 +80,7 @@
{ {
"type": "good_answer", "type": "good_answer",
"overall": 1, "overall": 1,
"impact": { "food_waste": 2, "emissions": 0, "income": 0 }
"impact": { "food_waste": 2, "emissions": 1, "income": 0 }
}, },
{ {
"type": "bad_answer", "type": "bad_answer",
@ -111,7 +111,7 @@
{ {
"type": "good_answer", "type": "good_answer",
"overall": 1, "overall": 1,
"impact": { "food_waste": 1, "emissions": 2, "income": 0 }
"impact": { "food_waste": 2, "emissions": 2, "income": 0 }
}, },
{ {
"type": "bad_answer", "type": "bad_answer",
@ -134,7 +134,7 @@
{ {
"type": "good_answer", "type": "good_answer",
"overall": 2, "overall": 2,
"impact": { "food_waste": 1, "emissions": 2, "income": 2 }
"impact": { "food_waste": 1, "emissions": 1, "income": 2 }
}, },
{ {
"type": "chance", "type": "chance",
@ -142,7 +142,7 @@
{ {
"type": "good_answer", "type": "good_answer",
"overall": 1, "overall": 1,
"impact": { "food_waste": 1, "emissions": 0, "income": 2 }
"impact": { "food_waste": 1, "emissions": 1, "income": 2 }
}, },
{ {
"type": "bad_answer", "type": "bad_answer",


Loading…
Cancel
Save