|
| 1 | +# Bitrequest Translation Prompt |
| 2 | + |
| 3 | +Use this prompt with an AI assistant (Claude, ChatGPT, etc.) to generate a translation file for Bitrequest. |
| 4 | + |
| 5 | +## Instructions |
| 6 | + |
| 7 | +1. Copy the prompt below. |
| 8 | +2. Replace `[YOUR LANGUAGE]`, `[COUNTRYCODE]`, and `[FLAG]` with your language, ISO 639-1 code, and country flag emoji (e.g. `German` / `de` / `🇩🇪`, `Japanese` / `ja` / `🇯🇵`, `Portuguese` / `pt` / `🇵🇹`). |
| 9 | +3. Paste the prompt into an AI assistant along with the English source file (`assets/js/bitrequest/lang/en.js`). Optionally include existing translations (e.g. `_nl.js`, `_fr.js`, `_es.js`) for additional context. |
| 10 | +4. Review the output carefully — AI translations need human verification, especially for crypto terminology. |
| 11 | +5. Test the file in Bitrequest before submitting a pull request. |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## The Prompt |
| 16 | + |
| 17 | +``` |
| 18 | +You are translating a JavaScript language file for Bitrequest, an open-source, non-custodial cryptocurrency point-of-sale app. Translate the attached English file into [YOUR LANGUAGE] (country code: [COUNTRYCODE]). |
| 19 | +
|
| 20 | +## Critical rules |
| 21 | +
|
| 22 | +1. **Do NOT translate variables.** Variables like `data.currency`, `data.amount`, `data.url`, `data.address`, etc. must remain exactly as they are. You may rearrange their position to fit natural sentence structure in [YOUR LANGUAGE]. |
| 23 | +
|
| 24 | +2. **Do NOT translate object keys.** Only translate the string values (right side of the colon). |
| 25 | +
|
| 26 | +3. **Do NOT translate HTML tags or attributes.** Preserve all `<span>`, `<a>`, `<br/>` tags and their attributes (`id`, `class`, `data-*`, `href`, `target`) exactly as they are. |
| 27 | +
|
| 28 | +4. **Rename the function** from `lang_en` to `lang_[COUNTRYCODE]`. |
| 29 | +
|
| 30 | +5. **Keep string lengths similar** to the English original where possible (UI space is limited). |
| 31 | +
|
| 32 | +6. **Leave blank** any string you're uncertain about — blanks will default to English. |
| 33 | +
|
| 34 | +7. **Preserve the ternary operator** in `sharetitlename` exactly as structured, only translating the string portions. |
| 35 | +
|
| 36 | +## Cryptocurrency terminology guidelines |
| 37 | +
|
| 38 | +This is a cryptocurrency app. Many technical terms should NOT be literally translated but kept in English or use the established term in the [YOUR LANGUAGE]-speaking crypto community. Research how each term is actually used by [YOUR LANGUAGE]-speaking crypto users, developers, and media. |
| 39 | +
|
| 40 | +### Terms that are typically kept in English across most languages: |
| 41 | +- blockchain (do NOT literally translate to "chain of blocks" equivalent) |
| 42 | +- Lightning Network / Lightning |
| 43 | +- SegWit / Legacy |
| 44 | +- Xpub / Xpriv / BIP32 / BIP39 |
| 45 | +- token / ERC20 |
| 46 | +- viewkey |
| 47 | +- macaroon |
| 48 | +- satoshis / sats |
| 49 | +- proxy / API / RPC / REST |
| 50 | +- websocket |
| 51 | +- blockexplorer |
| 52 | +- QR / QR code |
| 53 | +- CSV |
| 54 | +- PIN |
| 55 | +- NFC |
| 56 | +
|
| 57 | +### Terms that are usually translated (verify for your language): |
| 58 | +- wallet → find the established crypto term (e.g. Spanish: "monedero", French: "portefeuille", Dutch: "wallet") |
| 59 | +- private key / public key → usually translated |
| 60 | +- secret phrase / seed phrase → usually translated |
| 61 | +- node → check if translated or kept as "node" |
| 62 | +- transaction → usually translated |
| 63 | +- address → usually translated |
| 64 | +- invoice → depends on language and context (Lightning invoices may stay as "invoice") |
| 65 | +- Layer 2 → check if translated (e.g. Spanish: "Capa 2", French: "Couche 2") |
| 66 | +- fiat → usually kept as "fiat" |
| 67 | +- derivation path → technical, check community usage |
| 68 | +- confirmations → usually translated |
| 69 | +- point of sale → usually translated |
| 70 | +
|
| 71 | +### How to decide: |
| 72 | +- Search crypto news sites, exchanges (Binance, Coinbase), and community forums in [YOUR LANGUAGE] |
| 73 | +- Check if Bitcoin/Monero/Ethereum documentation has official translations |
| 74 | +- Check the Monero Localization Workgroup on GitHub for terminology guides |
| 75 | +- When in doubt, keep the English term — the crypto community is used to English jargon |
| 76 | +
|
| 77 | +## Context about the app |
| 78 | +
|
| 79 | +- Bitrequest is a point-of-sale payment request app (not a wallet that sends funds) |
| 80 | +- "request" in this app means a payment request / payment solicitation |
| 81 | +- It supports Bitcoin (on-chain + Lightning Network), Monero, and ERC-20 tokens |
| 82 | +- It has a "cashier mode" for team members with restricted access |
| 83 | +- "secret phrase" refers to a BIP39 12-word mnemonic seed |
| 84 | +- "proxy" refers to a self-hosted PHP server that relays API calls and Lightning node connections |
| 85 | +- The app runs as a PWA (Progressive Web App) and has iOS/Android apps |
| 86 | +
|
| 87 | +## Output format |
| 88 | +
|
| 89 | +Return the complete translated JavaScript file, ready to use. Keep all comments in English (they are developer-facing). Make sure the file is syntactically valid JavaScript. |
| 90 | +``` |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +## After generating the translation |
| 95 | + |
| 96 | +1. Save the output as `assets_js_bitrequest_lang_[COUNTRYCODE].js` |
| 97 | +2. Register your language in `assets/js/bitrequest/lang_meta.js` by adding an entry to the `LANG_META` object: |
| 98 | +```js |
| 99 | +"[COUNTRYCODE]": {"lang": "[YOUR LANGUAGE]", "flag": "[FLAG]", "fn": "lang_[COUNTRYCODE]"} |
| 100 | +``` |
| 101 | + Bitrequest loads only the active language at runtime — there's no longer a `<script>` tag to add to `index.html`. The dynamic loader looks up the `fn` field to resolve which function the file defines. |
| 102 | +3. **Test everything** — verify variables render correctly, strings fit in the UI, and crypto terminology is natural. Pick your language in settings; the loader will fetch your file on demand. |
| 103 | +4. Submit a pull request to the [Bitrequest repository](https://github.com/bitrequest/bitrequest.github.io) |
0 commit comments