Skip to content

feat: add Javanese (jv) locale support - #1496

Merged
khaira777 merged 4 commits into
mainfrom
fm/flocafe-i18n-javanese
Nov 7, 2026
Merged

khaira777 merged 4 commits into
mainfrom
fm/flocafe-i18n-javanese

Conversation

@khaira777

@khaira777 khaira777 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Implement full Javanese (jv, jv-ID, Basa Jawa) language support across the entire FloCafe application, including the main POS app, KDS, Server App, Customer Display, Setup, Settings, thermal print/KOT labels, WhatsApp plain-text reports, and sample seed data.

Fixes #1479

What Changed

  • Added the Javanese (jv / jv-ID, Basa Jawa) locale to the frontend language registry (frontend/src/lib/i18n/languages.ts) along with the full frontend/src/lib/i18n/messages/jv.json translation catalogue.
  • Added Javanese backend localization for thermal receipt/KOT/Z-report print labels (main/print/print-labels.generated.ts), startup/shutdown status splash messages (main/status-messages.ts), and localized express and demo setup seed data (main/setup/seed-data.ts).
  • Extended i18n parity, Unicode NFC, invisible-character, terminology, receipt, and setup test suites and updated documentation to reflect the 26 supported locales.

Risk Assessment

✅ Low: The change is a well-bounded addition of the Javanese (jv / jv-ID) locale following the established language registration, message catalog, print label generation, status message, seed data, documentation, and test patterns without altering core runtime logic.

Testing

Built the backend and static frontend, ran 16 focused i18n, receipt, print-label, setup-seed, status-message, locale-chunk, and WhatsApp report test suites plus the Playwright phase7-setup-print-i18n.spec.ts E2E suite, and drove a live 3-server FloCafe instance (POS/API, KDS, and Server App) in Chromium under jv-ID (Basa Jawa), capturing 9 high-resolution PNG screenshots, persisted SQLite seed state, thermal/KOT label output, and a formatted Javanese WhatsApp Z-report; all scenarios and checks passed.

  • Live validation: ✅ go - 6 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Operator selects Basa Jawa (jv, jv-ID) in the first-run Setup Wizard and completes Demo profile initialization, persisting language=jv and Javanese sample categories, products (Sego Goreng Jawa, Sate… ✅ pass live ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/01_setup_wizard_javanese.png, ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/02_javanese_demo_seed_db_sta…
Signed-in operator uses the Main POS App, Dashboard, and Settings > Store Details in Javanese (jv-ID, dir=ltr), adding seeded Javanese items to the cart and viewing localized navigation, order-type pi… ✅ pass live ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/03_pos_javanese_catalog_and_cart.png, ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/04_settings_store_de…
Staff places a tableside order from the standalone Server App in Javanese (Kirim menyang pawon) and observes the active order on the standalone KDS (Tampilan Pawon) and paired Customer Display (Lagi d… ✅ pass live ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/06_server_app_javanese.png, ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/07_kds_standalone_javanese.png…
Print-Test page, browser/HTML receipts, tableside order slips, and ESC/POS thermal & KOT print labels render in Javanese (CETAK MANEH, Gunggung Akhir, TIKET PESENAN PAWON, Gawa Mulih) while keeping UI… ✅ pass live ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/05_print_test_javanese.png, ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/10_javanese_thermal_kot_labels…
WhatsApp plain-text X/Z cash closure reports and Electron startup/shutdown status messages format in Javanese with consistent cash-movement terminology (Lebokake Tunai / Wetokake Tunai) and LTR direct… ✅ pass live ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/12_javanese_whatsapp_z_report.txt, npm run test:cash-closures, npm run test:status-messages
Adversarial translation guard rejects untranslated English-identical strings, [JV]/[TODO] placeholders, non-NFC sequences, invisible formatting characters, and welded order-number placeholders in jv.j… ✅ pass live npm run test:translations

Setup Wizard in Javanese (Basa Jawa, jv-ID)

Evidence: Persisted Javanese Demo Seed State (SQLite)
{
  "languageSetting": "jv",
  "categories": [
    {
      "id": "cat-demo-starters",
      "name": "Panganan Wiwitan"
    },
    {
      "id": "cat-demo-main",
      "name": "Dhaharan Utama"
    },
    {
      "id": "cat-demo-beverages",
      "name": "Ombenan"
    },
    {
      "id": "cat-demo-desserts",
      "name": "Panganan Legi"
    }
  ],
  "sampleProducts": [
    {
      "id": "prod-demo-sate",
      "name": "Sate Ayam",
      "price": 280
    },
    {
      "id": "prod-demo-sego-goreng",
      "name": "Sego Goreng Jawa",
      "price": 800
    },
    {
      "id": "prod-demo-es-teh",
      "name": "Es Teh Legi",
      "price": 350
    },
    {
      "id": "prod-demo-gedhang",
      "name": "Gedhang Goreng",
      "price": 400
    },
    {
      "id": "prod-demo-mendoan",
      "name": "Tempe Mendoan",
      "price": 250
    },
    {
      "id": "prod-demo-ayam-kalasan",
      "name": "Ayam Bakar Kalasan",
      "price": 1100
    },
    {
      "id": "prod-demo-banyu",
      "name": "Banyu Mineral",
      "price": 200
    },
    {
      "id": "prod-demo-rawon",
      "name": "Rawon Daging",
      "price": 1200
    }
  ],
  "customers": [
    {
      "id": "cust-demo-1",
      "name": "Joko Susilo",
      "phone": "+6281234567811",
      "country_code": "+62"
    },
    {
      "id": "cust-demo-2",
      "name": "Sri Wahyuni",
      "phone": "+6281234567812",
      "country_code": "+62"
    },
    {
      "id": "cust-demo-3",
      "name": "Bambang Pamungkas",
      "phone": "+6281234567813",
      "country_code": "+62"
    }
  ],
  "users": [
    {
      "id": "5595db9c-4b6c-47f1-9745-0654922a0cfe",
      "name": "Raden Wijaya",
      "email": "[email protected]",
      "role": "owner"
    },
    {
      "id": "user-demo-cashier",
      "name": "Kasir Demo",
      "email": "[email protected]",
      "role": "cashier"
    },
    {
      "id": "user-demo-chef",
      "name": "Juru Masak Demo",
      "email": "[email protected]",
      "role": "chef"
    },
    {
      "id": "user-demo-manager",
      "name": "Manajer Demo",
      "email": "[email protected]",
      "role": "manager"
    }
  ]
}
![Main POS App with Javanese Catalog and Cart](https://github.com/user-attachments/assets/ce743615-f792-4cb3-899e-ea7fcc069be4) ![Settings Store Details in Javanese](https://github.com/user-attachments/assets/679090e3-8bf7-4275-994b-82bf7cf82979) ![Print-Test Screen in Javanese](https://github.com/user-attachments/assets/3b0a8a2a-e7c5-4b1a-ba1d-01800c23655b) ![Server App Tableside Ordering in Javanese](https://github.com/user-attachments/assets/838770cf-9160-47b6-ba49-c746708d3f95) ![Standalone KDS in Javanese](https://github.com/user-attachments/assets/bf6c734b-dab0-4996-8baf-a9e9274321d2) ![Customer Display in Javanese](https://github.com/user-attachments/assets/cadd3f3c-18a4-425c-940f-7cde29b0df05) ![Dashboard in Javanese](https://github.com/user-attachments/assets/9a6f72be-4099-4e78-ad24-bba5a4a334ec)
Evidence: Javanese Thermal and KOT Print Labels
{
  "grandTotal": "GUNGGUNG",
  "subtotal": "Sub-gunggung",
  "kotBanner": "TIKET PESENAN PAWON",
  "takeaway": "Gawa Mulih",
  "delivery": "Kiriman",
  "dineIn": "Mangan ing Kene",
  "thankYou": "Matur nuwun rawuhipun!"
}
![Rendered Javanese Browser Receipt (80mm Thermal)](https://github.com/user-attachments/assets/9950c936-1e65-4e4a-97c2-2608fa788ec0)
Evidence: Javanese WhatsApp Z-Report Plain-Text Output

📊 Laporan Z #7 - Warung Kopi Jogja 📅 Tanggal usaha: 7 Nov 2026 (07-11-2026, 07:00 - 07-11-2026, 22:00) 👤 Ditutup dening: Raden Wijaya 💰 Ringkesan Dodolan • Pemasukan Kotor: Rp 1.250.000 • Balekake Dhuwit: Rp 50.000 • Pemasukan Resik: Rp 1.200.000 • 18 tagihan 💳 Rincian Pambayaran • Tunai: Rp 850.000 (12) • Kertu: Rp 350.000 (6) 💵 Rekonsiliasi Laci Kas • Kas wiwitan: Rp 200.000 • Kas sing dikarepake: Rp 975.000 • Kas sing diitung: Rp 975.000 • Bedane: Rp 0 (✅ Pas) 📝 Cathetan Panutupan: Laci kas wis diitung ping pindho

📊 *Laporan Z #7 - Warung Kopi Jogja*
📅 *Tanggal usaha:* 7 Nov 2026 (07-11-2026, 07:00 - 07-11-2026, 22:00)
👤 *Ditutup dening:* Raden Wijaya

💰 *Ringkesan Dodolan*
• Pemasukan Kotor: Rp 1.250.000
• Balekake Dhuwit: Rp 50.000
• Pemasukan Resik: Rp 1.200.000
• 18 tagihan

💳 *Rincian Pambayaran*
• Tunai: Rp 850.000 (12)
• Kertu: Rp 350.000 (6)

💵 *Rekonsiliasi Laci Kas*
• Kas wiwitan: Rp 200.000
• Kas sing dikarepake: Rp 975.000
• Kas sing diitung: Rp 975.000
• Bedane: Rp 0 (✅ Pas)

📝 *Cathetan Panutupan:* Laci kas wis diitung ping pindho

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 6 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Operator selects Basa Jawa (jv, jv-ID) in the first-run Setup Wizard and completes Demo profile initialization, persisting language=jv and Javanese sample categories, products (Sego Goreng Jawa, Sate… ✅ pass live ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/01_setup_wizard_javanese.png, ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/02_javanese_demo_seed_db_sta…
Signed-in operator uses the Main POS App, Dashboard, and Settings > Store Details in Javanese (jv-ID, dir=ltr), adding seeded Javanese items to the cart and viewing localized navigation, order-type pi… ✅ pass live ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/03_pos_javanese_catalog_and_cart.png, ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/04_settings_store_de…
Staff places a tableside order from the standalone Server App in Javanese (Kirim menyang pawon) and observes the active order on the standalone KDS (Tampilan Pawon) and paired Customer Display (Lagi d… ✅ pass live ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/06_server_app_javanese.png, ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/07_kds_standalone_javanese.png…
Print-Test page, browser/HTML receipts, tableside order slips, and ESC/POS thermal & KOT print labels render in Javanese (CETAK MANEH, Gunggung Akhir, TIKET PESENAN PAWON, Gawa Mulih) while keeping UI… ✅ pass live ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/05_print_test_javanese.png, ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/10_javanese_thermal_kot_labels…
WhatsApp plain-text X/Z cash closure reports and Electron startup/shutdown status messages format in Javanese with consistent cash-movement terminology (Lebokake Tunai / Wetokake Tunai) and LTR direct… ✅ pass live ~/.no-mistakes/evidence/01M6TD3C2FQ1N79KG9T3XS9NYF/12_javanese_whatsapp_z_report.txt, npm run test:cash-closures, npm run test:status-messages
Adversarial translation guard rejects untranslated English-identical strings, [JV]/[TODO] placeholders, non-NFC sequences, invisible formatting characters, and welded order-number placeholders in jv.j… ✅ pass live npm run test:translations
  • npm run test:translations
  • npm run test:print-labels
  • npm run test:status-messages
  • npm run test:phase7-setup-i18n
  • npm run test:cash-closures
  • npm run test:rtl-setup-auth-settings
  • npm run test:rtl-dashboard-pos-common
  • npm run test:rtl-kds-server-whatsapp
  • npm run test:i18n-audit-remediations
  • npm run test:browser-receipts
  • npm run test:decoupled-ui-locale
  • npm run test:locale-chunks
  • npm run test:phase6-locale-loading
  • npm run test:kot-locale-cold-start
  • npm run test:auth-print-bootstrap-race
  • npm run test:issue-241-localized-errors
  • npm run build && npm run build:frontend
  • cd frontend && npx playwright test e2e/phase7-setup-print-i18n.spec.ts --config=playwright.config.ts --project=chromium
  • Live end-to-end Playwright browser run across Main Server (:3101), Standalone KDS (:3102), and Standalone Server App (:3103) driving first-run Javanese Setup Wizard, Demo seed persistence, POS cart, Settings, Print-Test, Server App tableside order submission, KDS ticket display, paired Customer Display, Dashboard, rendered 80mm browser receipt, and WhatsApp Z-Report plain-text output
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add Javanese locale across FloCafe

✨ Enhancement 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Add selectable Javanese translations across FloCafe’s POS, companion screens, setup, and settings.
• Localize print labels, status messages, and sample data for Javanese-language operation.
• Extend locale validation and update documentation for 26 supported languages.
Diagram

graph TD
  S["Language choice"] --> R["Locale registry"] --> C["Javanese catalog"] --> U["App screens"]
  C --> G["Label generator"] --> P["Print labels"]
  S --> D["Setup seed data"]
  S --> M["Status messages"]
Loading
High-Level Assessment

Follow the PR’s established locale-registration and catalogue approach. Reusing the existing print-label generator and language-specific seed patterns preserves the current translation source of truth; a separate localization mechanism would add unnecessary divergence.

Files changed (23) +4383 / -123

Enhancement (5) +3971 / -95
languages.tsRegister selectable jv-ID locale +7/-0

Register selectable jv-ID locale

• Adds Basa Jawa as a selectable left-to-right language with a lazy-loaded message catalogue.

frontend/src/lib/i18n/languages.ts

jv.jsonProvide the Javanese message catalogue +3601/-0

Provide the Javanese message catalogue

• Adds translations for application screens, receipts, kitchen workflows, reports, settings, setup, and WhatsApp, including ICU messages and placeholders.

frontend/src/lib/i18n/messages/jv.json

print-labels.generated.tsAdd generated Javanese print labels +148/-0

Add generated Javanese print labels

• Includes jv in the backend print-language list and adds labels for receipts, KOTs, delivery slips, Z-reports, and related output.

main/print/print-labels.generated.ts

seed-data.tsLocalize Javanese setup samples +202/-95

Localize Javanese setup samples

• Recognizes jv for setup seeding. Adds Javanese express categories and products plus demo menu items, staff names, and Indonesian customer examples.

main/setup/seed-data.ts

status-messages.tsAdd Javanese lifecycle messages +13/-0

Add Javanese lifecycle messages

• Adds localized text for startup checks, backup, service initialization, welcome, shutdown, and saved states.

main/status-messages.ts

Tests (12) +381 / -6
phase7-setup-print-i18n.spec.tsAdd Javanese print-option expectations +5/-0

Add Javanese print-option expectations

• Adds Javanese receipt, browser-print, and WhatsApp labels to the setup-and-print E2E fixture.

frontend/e2e/phase7-setup-print-i18n.spec.ts

browser-receipts.test.tsVerify Javanese browser receipts and order slips +48/-0

Verify Javanese browser receipts and order slips

• Loads jv messages and checks jv-ID/LTR metadata and localized labels in generated receipt and order-slip HTML.

tests/browser-receipts.test.ts

decoupled-ui-locale.test.tsCover Javanese UI with independent receipt settings +21/-1

Cover Javanese UI with independent receipt settings

• Adds a Javanese receipt case and checks that its rendered labels remain localized when UI language and store region differ.

tests/decoupled-ui-locale.test.ts

i18n-audit-remediations.test.tsInclude Javanese in locale audits +3/-0

Include Javanese in locale audits

• Adds jv to message-loading and catalogue checks and verifies its jv-ID/LTR metadata.

tests/i18n-audit-remediations.test.ts

phase3-print-regressions.test.tsExercise Javanese thermal KOT output +10/-2

Exercise Javanese thermal KOT output

• Adds jv to print regressions and verifies its time label and kitchen-ticket banner without leaking that banner into other locales.

tests/phase3-print-regressions.test.ts

phase7-setup-i18n.test.tsVerify Javanese express and demo seeds +54/-0

Verify Javanese express and demo seeds

• Checks localized sample categories, products, and staff, plus Indonesian-format demo customer numbers independent of store country.

tests/phase7-setup-i18n.test.ts

print-labels.test.tsPin Javanese print terminology +15/-0

Pin Javanese print terminology

• Asserts the thermal grand total and KOT banner, and distinguishes subtotal from total and takeaway from delivery.

tests/print-labels.test.ts

reports-whatsapp.test.tsExpect 26 localized report catalogues +1/-1

Expect 26 localized report catalogues

• Raises the all-locale WhatsApp report test’s expected catalogue count to 26.

tests/reports-whatsapp.test.ts

rtl-dashboard-pos-common.test.tsCheck Javanese LTR dashboard behavior +2/-0

Check Javanese LTR dashboard behavior

• Includes jv in direction and directional-toast checks for left-to-right locales.

tests/rtl-dashboard-pos-common.test.ts

rtl-kds-server-whatsapp.test.tsExtend companion-screen locale coverage +6/-1

Extend companion-screen locale coverage

• Loads jv messages and adds Javanese to KDS, Server App, WhatsApp, and LTR-direction test loops.

tests/rtl-kds-server-whatsapp.test.ts

rtl-setup-auth-settings.test.tsVerify Javanese browser-language detection +13/-0

Verify Javanese browser-language detection

• Checks that both jv-ID and bare jv resolve to the Javanese language key and includes jv in setup, auth, and settings coverage.

tests/rtl-setup-auth-settings.test.ts

translations.test.tsEnforce Javanese translation safeguards +203/-1

Enforce Javanese translation safeguards

• Adds an intentional-English-identical allowlist and rejects untranslated placeholders, non-NFC text, replacement characters, and invisible characters. Pins terminology, order-number formatting, and machine-readable CSV field names with negative validator tests.

tests/translations.test.ts

Documentation (6) +31 / -22
CONTRIBUTING.mdList Javanese among supported translations +1/-1

List Javanese among supported translations

• Adds Javanese to the contributor-facing list of available languages.

CONTRIBUTING.md

README.mdAdvertise 26 languages and Javanese support +2/-1

Advertise 26 languages and Javanese support

• Updates the supported-language count and adds Javanese to the README language list.

README.md

frontend.mdUpdate frontend locale counts +3/-3

Update frontend locale counts

• Changes architecture references from 25 to 26 registry entries and message files.

docs/architecture/frontend.md

internationalization.mdDocument Javanese in the locale catalogue +3/-3

Document Javanese in the locale catalogue

• Updates the supported-language count and includes jv in the catalogue inventory.

docs/architecture/internationalization.md

adding-a-language.mdRefresh translation validation and coverage guidance +13/-13

Refresh translation validation and coverage guidance

• Includes Javanese in NFC and invisible-character guidance and updates test-coverage counts for 26 locales.

docs/guides/adding-a-language.md

translation-terminology.mdRecord canonical Javanese terminology +9/-1

Record canonical Javanese terminology

• Documents Javanese terms for totals, order types, dietary tags, and cash movement, and notes NFC enforcement.

docs/reference/translation-terminology.md

@qodo-code-review

qodo-code-review Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Website understates supported languages ✗ Dismissed
Description
FloCafe's README.md now advertises 26 UI languages with Javanese added, but flopos.com's Features
page still says “25 Languages & Full RTL.” Once Javanese ships, visitors to that page will see an
outdated capability count until the website heading is updated.

Grey Divider

Context sources
✅ Linked PRs:
  🌐 PR #7
  🌐 PR #10
✅ Compliance rules (platform): 5 rules
✅ Cross-repo context — repo relationships
  Explored: repo: FreeOpenSourcePOS/flopos.com (sha: a2f87d48) — View relationship
  Explored: repo: FreeOpenSourcePOS/docs.flopos.com (sha: abe7cff3) — View relationship
Review mode: Auto: ⚖️ Balanced: Mostly translation catalog and docs; logic limited to seed data and print labels.

Grey Divider

Tip of the day
💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread README.md Resolved
@khaira777
khaira777 enabled auto-merge (squash) November 7, 2026 07:58
@khaira777
khaira777 merged commit 76eaf82 into main Nov 7, 2026
23 checks passed
@khaira777
khaira777 deleted the fm/flocafe-i18n-javanese branch November 7, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(i18n): add Javanese (Basa Jawa) locale (jv)

1 participant