Skip to content

Add arabic translation and rtl css override... - #82

Merged
NicolasDorier merged 14 commits into
btcpayserver:mainfrom
AdilElFarissi:main
Jun 23, 2026
Merged

NicolasDorier merged 14 commits into
btcpayserver:mainfrom
AdilElFarissi:main

Conversation

@AdilElFarissi

@AdilElFarissi AdilElFarissi commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Note:

  • Need more reviews from 2 or 3 arab countries.
  • The translator app don't work with the openrouter free models individually! work only with "openrouter/free" model and the result is not top... (i used google ai to translate).

Known bugs: CSS - The notifications box @ media < 991px.

Usage:

  • Create a language and copy/paste the key/value pairs or download the pack and activate it...
  • Install the css override in Server Settings > Branding > Enable Use custom theme > Select to extend dark or light themes, set the css-overrides\Arabic_RTL_Override.css > Save > enjoy :)

Thank you for your work!

Note: Need more reviews from 2 or 3 arab countries...
Known bugs: The notifications box @ media < 991px.
Usage:
- Create a language and copy/paste the key/value pairs or download the pack and activate it...
- Install the css override in Server Settings > Branding > Enable Use custom theme > Select to extend dark or light themes, set the css-overrides\Arabic_RTL_Override.css > Save > enjoy :)
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a1c33602-2bdb-4744-a1f8-e49fed578c98

📥 Commits

Reviewing files that changed from the base of the PR and between fb4d1ea and 9e7f3ba.

📒 Files selected for processing (1)
  • Translator/Services/TranslationExtractor.cs
💤 Files with no reviewable changes (1)
  • Translator/Services/TranslationExtractor.cs

📝 Walkthrough

Walkthrough

PR adds Arabic language support to the translator with two changes: infrastructure improvements for HTTP client certificate handling in TranslationExtractor (allowing localhost TLS bypass and better URL format error handling), and registration of the Arabic locale entry in manifest.json with translation file path, maintainer, and timestamp.

Changes

Arabic Language Support and HTTP Client Infrastructure

Layer / File(s) Summary
URL parsing and TLS certificate handling
Translator/Services/TranslationExtractor.cs
ExtractFromBTCPayServerAsync now parses the endpoint URL into a Uri object. For localhost or 127.0.0.1 over https, a temporary HttpClient with a custom handler that disables server certificate validation is used; all other hosts/schemes use the injected _httpClient. Malformed URLs are caught as UriFormatException and wrapped in InvalidOperationException with the original URL and error message.
Arabic locale registration
manifest.json
New language entry added to the Languages array with Code/Bcp47 set to "ar", Name/Native labels, translation file path translations/arabic.json, content Sha, Maintainer, and Updated timestamp.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit's tongue now joins the speech,
From Levant lands, within our reach,
HTTPS on localhost flows so free,
Errors caught with clarity,
🐇 Hop hop, new voices sing!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title references Arabic translation and RTL CSS, which aligns with the main changes: adding Arabic language support in manifest.json and modifying the translation extractor. However, it is incomplete as it mentions 'css override' but CSS was removed during review.
Description check ✅ Passed The description explains the Arabic translation addition, usage instructions, and CSS override implementation, which directly relate to the core changeset of adding Arabic language support and translation infrastructure modifications.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@css-overrides/Arabic_RTL_Override.css`:
- Around line 76-79: The NotificationsDropdown element at lines 76-79 uses a
hardcoded -200px offset in the inset property that is not properly overridden in
the `@media` (max-width: 991px) media query block at lines 81-90. To fix this, add
an inset property override within the `@media` (max-width: 991px) block for
`#NotificationsDropdown` that uses mobile-friendly positioning values appropriate
for smaller screens, removing the hardcoded -200px horizontal offset and
ensuring the dropdown stays within the viewport on devices with max-width of
991px or less.
- Line 5: The comment on line 5 violates the stylelint
`comment-whitespace-inside` rule due to missing whitespace before the closing
delimiter. In the comment `/* Right menu - Hide the scrollbar...*/`, add a space
between the closing text and the `*/` to ensure proper whitespace is present
both after the opening `/*` and before the closing `*/`.
- Around line 1-90: The Arabic_RTL_Override.css file is not being included in
the manifest because ManifestGenerator.cs only processes translation JSON files
and the manifest workflow is triggered only on translation file changes. To
resolve this, either extend ManifestGenerator.cs and the manifest schema to
support CSS file assets and ensure the manifest generation workflow includes CSS
files, OR add documentation clarifying that CSS overrides are managed separately
outside the translation package packaging flow and are not discovered via the
manifest. Choose the approach based on your intended distribution model for this
CSS file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 89250851-5927-49cf-8135-f1fd13fb7770

📥 Commits

Reviewing files that changed from the base of the PR and between 6155bea and 0d90441.

📒 Files selected for processing (2)
  • css-overrides/Arabic_RTL_Override.css
  • translations/arabic.json

Comment thread css-overrides/Arabic_RTL_Override.css Outdated
Comment thread css-overrides/Arabic_RTL_Override.css Outdated
Comment thread css-overrides/Arabic_RTL_Override.css Outdated
@teamssUTXO

Copy link
Copy Markdown
Collaborator

Hi @AdilElFarissi , thank you for the job you've done. Can you explain me what is the .css file ?

@AdilElFarissi

Copy link
Copy Markdown
Contributor Author

Hi @AdilElFarissi , thank you for the job you've done. Can you explain me what is the .css file ?

Hi @teamssUTXO , the arabic is a Right To Left (rtl) language and need some css adaptations to render it correctly... you can test it with English to see what an Arabic reader will see if she/he install the Arabic language pack without these CSS adjustements...

Thank you for asking :)

@NicolasDorier

Copy link
Copy Markdown
Member

@AdilElFarissi

About the known bug, can you open an issue on BTCpay? I don't think we use css files that are in this repo at all.

@AdilElFarissi

AdilElFarissi commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@AdilElFarissi

About the known bug, can you open an issue on BTCpay? I don't think we use css files that are in this repo at all.

Hi @NicolasDorier , the bug is in my amateur in action css :) and the css/folder is just to show what needs a change for the RTL languages... not a big deal... just margins and directions adaptations. you can remove it after testings.

but the missing RTL support is a BTCPay matter! i opened an issue here with an easily codable suggestion. should i open it on the BTCPay repo?

Thank you & Have a nice day :)

@NicolasDorier

Copy link
Copy Markdown
Member

@AdilElFarissi yes please, open the issue on BTCPay repo, and remove the CSS from this PR. You can copy the CSS in the issue you open, that can be helpful when we work on the issue.

@NicolasDorier

NicolasDorier commented Jun 17, 2026

Copy link
Copy Markdown
Member

LGTM, for RTL: btcpayserver/btcpayserver#7408

@teamssUTXO

Copy link
Copy Markdown
Collaborator

The JSON file seems to be not up to date. We currently have 2600 keys string, and the file just add 2200 keys. Can you check this ?

@AdilElFarissi

AdilElFarissi commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

@teamssUTXO , Indeed, my JSON is missing over 400 keys, but that's all the Translator returns! The keys are from Translations.Default.cs... i wrote 2 lines to compare and extract the missing keys from your translation :)
those are the keys that are not in Translations.Default.cs:

{
  "_maintainer": "",
  "2FA Security": "",
  "2FA and U2F/FIDO2 and LNURL-Auth Authentication Methods are not available. Please go to the https endpoint.": "",
  "A given currency pair match the most specific rule. If two rules are matching and are as specific, the first\n              rule\n                            will be chosen.": "",
  "Additional status information of the invoice": "",
  "Admin API access token": "",
  "Admin: Approval request": "",
  "Allows broadcasting wallet transactions from BTCPay Server on the selected stores.": "",
  "Allows broadcasting wallet transactions from BTCPay Server.": "",
  "Allows canceling wallet transactions on the selected stores.": "",
  "Allows canceling wallet transactions.": "",
  "Allows creating new invoices on the selected stores.": "",
  "Allows creating new invoices.": "",
  "Allows creating new users on this server.": "",
  "Allows creating pull payments on all your stores.": "",
  "Allows creating pull payments on the selected stores.": "",
  "Allows creating pull payments without automatic approval on all your stores.": "",
  "Allows creating wallet transactions (PSBTs) on the selected stores.": "",
  "Allows creating wallet transactions (PSBTs).": "",
  "Allows creating/deleting API keys for users.": "",
  "Allows crediting subscribers on all your stores.": "",
  "Allows crediting subscribers on the selected stores.": "",
  "Allows deleting pull payments on all your stores.": "",
  "Allows deleting pull payments on the selected stores.": "",
  "Allows deleting the user to whom it is assigned. Admin users can delete any user without this permission.": "",
  "Allows impersonation of the selected users.": "",
  "Allows managing invoices on all your stores and modify their settings.": "",
  "Allows managing invoices on the selected stores and modify their settings.": "",
  "Allows managing payouts on all your stores.": "",
  "Allows managing payouts on the selected stores.": "",
  "Allows managing subscribers on all your stores.": "",
  "Allows managing subscribers on the selected stores.": "",
  "Allows managing wallet settings and metadata on the selected stores.": "",
  "Allows managing wallet settings and metadata.": "",
  "Allows managing wallet transactions on all your stores.": "",
  "Allows managing wallet transactions on the selected stores.": "",
  "Allows managing wallets on all your stores, including wallet settings and transactions.": "",
  "Allows managing wallets on the selected stores, including wallet settings and transactions.": "",
  "Allows modifying offerings on all your stores.": "",
  "Allows modifying offerings on the selected stores.": "",
  "Allows modifying the webhooks of all your stores.": "",
  "Allows modifying the webhooks of the selected stores.": "",
  "Allows seeing all users on this server.": "",
  "Allows sending emails on behalf of all your stores.": "",
  "Allows sending emails on behalf of the selected stores.": "",
  "Allows signing wallet transactions (PSBTs) on the selected stores.": "",
  "Allows signing wallet transactions (PSBTs).": "",
  "Allows user impersonation.": "",
  "Allows using the internal BTCPay Server lightning node to create BOLT11 invoices, connect to other nodes, open new channels and pay BOLT11 invoices.": "",
  "Allows using the internal BTCPay Server lightning node to create BOLT11 invoices.": "",
  "Allows using the internal BTCPay Server lightning node to view BOLT11 invoices.": "",
  "Allows using the lightning nodes connected to all your stores to create BOLT11 invoices, connect to other nodes, open new channels and pay BOLT11 invoices.": "",
  "Allows using the lightning nodes connected to all your stores to create BOLT11 invoices.": "",
  "Allows using the lightning nodes connected to the selected stores to create BOLT11 invoices, connect to other nodes, open new channels and pay BOLT11 invoices.": "",
  "Allows using the lightning nodes connected to the selected stores to create BOLT11 invoices.": "",
  "Allows viewing and modifying invoices on the selected stores.": "",
  "Allows viewing and modifying invoices.": "",
  "Allows viewing and modifying your user notifications.": "",
  "Allows viewing and modifying your user profile.": "",
  "Allows viewing invoices on the selected stores.": "",
  "Allows viewing invoices.": "",
  "Allows viewing offerings on all your stores.": "",
  "Allows viewing offerings on the selected stores.": "",
  "Allows viewing payment requests.": "",
  "Allows viewing payouts on all your stores.": "",
  "Allows viewing payouts on the selected stores.": "",
  "Allows viewing pull payments on all your stores.": "",
  "Allows viewing pull payments on the selected stores.": "",
  "Allows viewing reports.": "",
  "Allows viewing stores settings.": "",
  "Allows viewing the lightning invoices connected to all your stores.": "",
  "Allows viewing the lightning invoices connected to the selected stores.": "",
  "Allows viewing the selected stores' payment requests.": "",
  "Allows viewing the selected stores' reports.": "",
  "Allows viewing the selected stores' settings.": "",
  "Allows viewing wallets, balances, and transactions on the selected stores.": "",
  "Allows viewing wallets, balances, and transactions.": "",
  "Allows viewing your user notifications.": "",
  "Allows viewing your user profile.": "",
  "Allows viewing, modifying, deleting and creating new payment requests on all your stores.": "",
  "Allows viewing, modifying, deleting and creating new payment requests on the selected stores.": "",
  "Allows viewing, modifying, deleting and creating pull payments on all your stores.": "",
  "Allows viewing, modifying, deleting and creating pull payments on the selected stores.": "",
  "Allows viewing, modifying, deleting and creating pull payments without automatic approval on the selected stores.": "",
  "App-based 2FA": "",
  "Appearance": "",
  "Archive selected stores' pull payments": "",
  "Archive your pull payments": "",
  "Authentication": "",
  "Broadcast wallet transactions": "",
  "Browse": "",
  "Browse the API documentation": "",
  "But now, what if you want to support <code>DOGE</code>? The problem with <code>DOGE</code> is that most\n                   exchange do\n                            not have any pair for it. But <code>bitpay</code> has a <code>DOGE_BTC</code> pair.<br />Luckily, the rule engine allow you to\n                       reference\n                            rules:": "",
  "Can impersonate the selected users": "",
  "Can impersonate users": "",
  "Can use RPC import": "",
  "Cancel wallet transactions": "",
  "Choose a language...": "",
  "Clear filter": "",
  "Codes": "",
  "Configure Passkey Authentication": "",
  "Configure Two-Factor Authentication": "",
  "Configure a file provider": "",
  "Configure customer's forms": "",
  "Configure exchange rates": "",
  "Configure server's email settings": "",
  "Configure store's email settings": "",
  "Configure the appearance of the checkout": "",
  "Configure the branding appearance of the server": "",
  "Configure the payout processors": "",
  "Configure the server settings": "",
  "Configure webhooks": "",
  "Connect BTCPay Server to your Shopify checkout experience to accept Bitcoin.": "",
  "Create an invoice": "",
  "Create invoices from the lightning nodes associated with your stores": "",
  "Create invoices with internal lightning node": "",
  "Create new users": "",
  "Create non-approved pull payments": "",
  "Create non-approved pull payments in selected stores": "",
  "Create pull payments": "",
  "Create pull payments in selected stores": "",
  "Create temporary file link": "",
  "Create wallet transactions": "",
  "Credit your subscribers": "",
  "Customer external reference": "",
  "Customer metadata": "",
  "Customer name": "",
  "Default dictionary changed to {0}": "",
  "Delete dictionary": "",
  "Device": "",
  "Dictionaries": "",
  "Dictionaries enable you to translate the BTCPay Server backend into different languages.": "",
  "Dictionary": "",
  "Dictionary {0} deleted": "",
  "Dictionary created": "",
  "Dictionary updated": "",
  "DISABLE": "",
  "Disable 2FA": "",
  "Disable two-factor authentication (2FA)": "",
  "Disabling 2FA does not change the keys used in the authenticator apps. If you wish to change the key used in an authenticator app you should reset your authenticator keys.": "",
  "Download": "",
  "Download language pack": "",
  "Download Language Pack": "",
  "Each address generated will be imported into the node wallet and you can view your balance through the node.": "",
  "Enable 2FA": "",
  "Enter extended public key (xPub)": "",
  "Exchange": "",
  "Export the PSBT for your wallet. Sign it with your wallet and import the signed PSBT version here for finalization and broadcasting.": "",
  "Fallback": "",
  "Filter by label": "",
  "Go to the dashboard": "",
  "Go to the maintenance page": "",
  "Go to the store's settings": "",
  "Grants total control on the server settings of your server.": "",
  "Grants unrestricted access to your account.": "",
  "I wrote down my recovery codes": "",
  "If a translation isn’t available in the new dictionary, it will be searched in the fallback.": "",
  "If you lose your device and don't have the recovery codes you will lose access to your account.": "",
  "Impersonate": "",
  "Import keys to RPC": "",
  "Important notice": "",
  "In Shopify, please do the following …": "",
  "Install, update, and configure plugins": "",
  "Invalidates the current authenticator configuration. Useful if you believe your authenticator settings were compromised.": "",
  "Invoice - Became Invalid": "",
  "Invoice - Created": "",
  "Invoice - Expired": "",
  "Invoice - Expired Paid Late": "",
  "Invoice - Expired Paid Partial": "",
  "Invoice - Is Processing": "",
  "Invoice - Is Settled": "",
  "Invoice - Payment Settled": "",
  "Invoice - Received Payment": "",
  "Keys": "",
  "List": "",
  "Localization": "",
  "Localize the user interface": "",
  "Log another device from a QR Code": "",
  "Login code was invalid": "",
  "Manage API Keys": "",
  "Manage payouts": "",
  "Manage payouts in selected stores": "",
  "Manage selected stores": "",
  "Manage selected stores' payment requests": "",
  "Manage selected stores' pull payments": "",
  "Manage selected stores' wallet settings": "",
  "Manage selected stores' wallet transactions": "",
  "Manage selected stores' wallets": "",
  "Manage the notification settings": "",
  "Manage users": "",
  "Manage wallet settings": "",
  "Manage wallet transactions": "",
  "Manage wallets": "",
  "Manage your account": "",
  "Manage your notifications": "",
  "Manage your profile": "",
  "Manage your pull payments": "",
  "Manage your server": "",
  "Manage your subscribers": "",
  "Modify invoices": "",
  "Modify selected stores' webhooks": "",
  "Modify stores webhooks": "",
  "Modify your offerings": "",
  "Modify your payment requests": "",
  "Modify your stores": "",
  "Multisig - Pending Transaction Created": "",
  "Multisig - Pending Transaction Signature Collected": "",
  "Multisig - Signer Key Requested": "",
  "Multisig - Signer Key Submitted": "",
  "Multisig - Wallet Created": "",
  "Non-admins can import Hot Wallets for their Store": "",
  "Offering app ID": "",
  "Offering ID": "",
  "Offering metadata": "",
  "Offering name": "",
  "Overview": "",
  "Payment Request - Archived": "",
  "Payment Request - Completed": "",
  "Payment Request - Created": "",
  "Payment Request - Status Changed": "",
  "Payment Request - Updated": "",
  "Payout": "",
  "Payout - Approved": "",
  "Payout - Created": "",
  "Payout - Updated": "",
  "Pending Transaction - Broadcast": "",
  "Pending Transaction - Cancelled": "",
  "Pending Transaction - Created": "",
  "Pending Transaction - Signature Collected": "",
  "Plan name": "",
  "PrettyName(BTC-CHAIN)": "",
  "PrettyName(BTC-LN)": "",
  "PrettyName(BTC-LNURL)": "",
  "Processors": "",
  "Profile": "",
  "Pull": "",
  "Put these codes in a safe place": "",
  "QR": "",
  "Re-enabling will not require you to reconfigure your app.": "",
  "Recovery Code": "",
  "Recovery codes": "",
  "Refer to this guide to get started with Shopify V2": "",
  "Regenerate your 2FA recovery codes.": "",
  "Remember this machine": "",
  "Remove the translation from this dictionary.": "",
  "Reset app": "",
  "Reset recovery codes": "",
  "Rules": "",
  "Select a language to download from the community translation repository.": "",
  "Select Language": "",
  "Send selected stores' emails": "",
  "Send store emails": "",
  "Shop Name": "",
  "Shopify": "",
  "Sign wallet transactions": "",
  "Stop Shopify calls and clear credentials": "",
  "Storage": "",
  "Subscriber email": "",
  "Subscriber metadata": "",
  "Subscriber phase (Trial, Normal, Grace, Expired)": "",
  "Subscription - Credit refund issued": "",
  "Subscription - Need upgrade": "",
  "Subscription - New subscriber": "",
  "Subscription - Payment reminder": "",
  "Subscription - Plan started": "",
  "Subscription - Subscriber activated": "",
  "Subscription - Subscriber charged": "",
  "Subscription - Subscriber credited": "",
  "Subscription - Subscriber disabled": "",
  "Subscription - Subscriber phase changed": "",
  "The amount of the payment request": "",
  "The backend link to the invoice": "",
  "The base URL of this server (Server Settings ➡ Branding)": "",
  "The billing portal URL of the logged account": "",
  "The contact URL of the server (Server Settings ➡ Branding)": "",
  "The currency of the invoice": "",
  "The currency of the payment request": "",
  "The current state of the payout": "",
  "The current status of the invoice": "",
  "The description of the payment request": "",
  "The destination of the payout": "",
  "The email addresses of the admins separated by a comma": "",
  "The email of the buyer taken from the invoice's metadata buyerEmail (eg. john.doe@example.com)": "",
  "The email of the user (eg. john.doe@example.com)": "",
  "The form response associated with the payment request": "",
  "The formatted mailbox address to use when sending an email to the buyer. (eg. \"John Doe\" <john.doe@example.com>)": "",
  "The formatted mailbox address to use when sending an email to the recipient. (eg. \"John Doe\" <john.doe@example.com>)": "",
  "The formatted mailbox address to use when sending an email to the signer. (eg. \"John Doe\" <john.doe@example.com>)": "",
  "The formatted mailbox address to use when sending an email. (eg. \"John Doe\" <john.doe@example.com>)": "",
  "The id of the invoice": "",
  "The id of the payment request": "",
  "The id of the payout": "",
  "The id of the pending transaction": "",
  "The id of the pending transaction (if available)": "",
  "The id of the pull payment": "",
  "The id of the store": "",
  "The link that the admin needs to use to approve the user": "",
  "The link that the user can use to login": "",
  "The link to the password reset page": "",
  "The link to the payment request": "",
  "The link to the pending transaction or wallet transaction list": "",
  "The link to the wallet transaction list": "",
  "The link used to confirm the user's email address": "",
  "The link where the invited user can set up their account": "",
  "The metadata associated with the invoice": "",
  "The metadata associated with the payout": "",
  "The multisig setup request id": "",
  "The multisig setup session link": "",
  "The name of the buyer taken from the invoice's metadata buyerName (eg. John Doe)": "",
  "The name of the server (Server Settings ➡ Branding)": "",
  "The name of the store": "",
  "The name of the user (eg. John Doe)": "",
  "The number of collected signatures": "",
  "The number of missing signatures": "",
  "The number of required signatures": "",
  "The number of signatures collected": "",
  "The number of signatures needed": "",
  "The order id associated with the invoice": "",
  "The pending transaction link": "",
  "The price of the invoice": "",
  "The QR code representation of the invitation link": "",
  "The recipient email address": "",
  "The recipient name": "",
  "The reference id of the payment request": "",
  "The signer email address": "",
  "The signer name": "",
  "The status of the payment request": "",
  "The store id of the pending transaction": "",
  "The support url of the store": "",
  "The title of the payment request": "",
  "The total number of signatures": "",
  "The trimmed id of the payment request": "",
  "The trimmed id of the pending transaction": "",
  "The trimmed id of the pending transaction (if available)": "",
  "The wallet crypto code": "",
  "The website of the store": "",
  "These translations are maintained by the community at": "",
  "This account has been locked out because of multiple invalid login attempts. Please try again later.": "",
  "This action will also delete all stores, invoices, apps and data associated with the user.": "",
  "This dictionary will be removed from this server.": "",
  "This process disables 2FA until you verify your authenticator app and will also reset your 2FA recovery codes. If you do not complete your authenticator app configuration you may lose access to your account.": "",
  "Time must be at least 1": "",
  "To use the translation from this dictionary's fallback, you can:": "",
  "Tokens": "",
  "Two-Factor": "",
  "Unknown command": "",
  "Unrestricted access": "",
  "Update the server": "",
  "Use the internal lightning node": "",
  "Use the lightning nodes associated with your stores": "",
  "User: Account approved": "",
  "User: Email confirmation": "",
  "User: Invitation": "",
  "User: Password Reset Requested": "",
  "View all the stores": "",
  "View invoices": "",
  "View invoices from internal lightning node": "",
  "View payouts": "",
  "View payouts in selected stores": "",
  "View predefined store roles": "",
  "View selected stores' pull payments": "",
  "View selected stores' wallets": "",
  "View server's email rules": "",
  "View server's registered users": "",
  "View store roles": "",
  "View store users": "",
  "View store's email rules": "",
  "View the access tokens (for legacy API access)": "",
  "View the lightning invoices associated with your stores": "",
  "View the logs": "",
  "View the payment requests": "",
  "View the payouts": "",
  "View the pull payments": "",
  "View access to external services": "",
  "View users": "",
  "View wallets": "",
  "View your notifications": "",
  "View your offerings": "",
  "View your payment requests": "",
  "View your profile": "",
  "View your pull payments": "",
  "View your reports": "",
  "View your selected stores' reports": "",
  "View your stores": "",
  "When this is enabled for a hot wallet, you are also able to use the node wallet to spend.": "",
  "You have no recovery codes left.": "",
  "You have requested to log in with a recovery code. This login will not be remembered until you provide an authenticator app code at login or disable 2FA and log in again.": "",
  "You only have 1 recovery code left.": "",
  "Your existing recovery codes will no longer be valid!": ""
}

@NicolasDorier

Copy link
Copy Markdown
Member

@teamssUTXO @AdilElFarissi the Translation.Default.cs is missing strings, we should remove any process or doc using it.
You need to run btcpayserver in dev, and --btcpay-url. Anyway, this can be improved later.

I think we should merge that for the time being.

i think is ready for more reviews... arabic is a complex language and geo-contextual... a word may mean other things in other arab countries.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@manifest.json`:
- Line 180: In the manifest.json file, locate the "Maintainer" entry with the
value "AdilElFarissi|https://github.com/AdilElFarissi" and remove the extra
space between the closing quote and the comma so that it reads
"AdilElFarissi|https://github.com/AdilElFarissi", matching the formatting style
of other entries in the manifest.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 52f4670c-7cbb-439a-9f89-713cef60924e

📥 Commits

Reviewing files that changed from the base of the PR and between 0d90441 and c544292.

📒 Files selected for processing (2)
  • manifest.json
  • translations/arabic.json

Comment thread manifest.json Outdated
The Translator return an error when you try to connect with --btcpay-url and the localhost is under https with a self signed cert (BTCPay DEV> --launch-profile Bitcoin-HTTPS)...

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
Translator/Services/TranslationExtractor.cs (1)

43-43: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider extracting duplicate log statement.

The same log message appears in both branches. Moving it before the if block reduces duplication.

♻️ Proposed refactor
             Uri uri = new(url, UriKind.Absolute);
             HttpResponseMessage response;
+            _logger.LogInformation("Fetching translations from BTCPay Server at {Url}", url);
             if((uri.Host == "localhost" || uri.Host == "127.0.0.1") && uri.Scheme == "https")
             {
                 var handler = new HttpClientHandler
                 {
                     ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
                 };

-                _logger.LogInformation("Fetching translations from BTCPay Server at {Url}", url);
                 using var client = new HttpClient(handler, disposeHandler: true);
                 response = await client.GetAsync(url);
             }
             else
             {
-                _logger.LogInformation("Fetching translations from BTCPay Server at {Url}", url);
                 response = await _httpClient.GetAsync(url);
             }

Also applies to: 50-50

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Translator/Services/TranslationExtractor.cs` at line 43, The
_logger.LogInformation call that logs "Fetching translations from BTCPay Server
at {Url}" appears in duplicate across multiple branches in the conditional
logic. Extract this log statement by moving it before the if block so it
executes regardless of the branch taken, eliminating the redundant logging code
while maintaining the same functionality.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Translator/Services/TranslationExtractor.cs`:
- Around line 38-46: The HttpClientHandler and HttpClient created in the code
block are not safely disposed. Replace the manual instantiation and disposal
pattern with using declarations to ensure proper cleanup even if GetAsync throws
an exception. Specifically, wrap both the HttpClientHandler and HttpClient
creation in using statements, and pass disposeHandler: true to the HttpClient
constructor so that the handler is properly disposed when the client is
disposed. Remove the manual client.Dispose() call and instead rely on the using
block to handle cleanup automatically.

---

Nitpick comments:
In `@Translator/Services/TranslationExtractor.cs`:
- Line 43: The _logger.LogInformation call that logs "Fetching translations from
BTCPay Server at {Url}" appears in duplicate across multiple branches in the
conditional logic. Extract this log statement by moving it before the if block
so it executes regardless of the branch taken, eliminating the redundant logging
code while maintaining the same functionality.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2c5e8513-e0df-4039-8e01-18d94e126ace

📥 Commits

Reviewing files that changed from the base of the PR and between c544292 and fb4d1ea.

📒 Files selected for processing (3)
  • Translator/Services/TranslationExtractor.cs
  • manifest.json
  • translations/arabic.json
✅ Files skipped from review due to trivial changes (1)
  • manifest.json

Comment on lines +38 to +46
var handler = new HttpClientHandler
{
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};

_logger.LogInformation("Fetching translations from BTCPay Server at {Url}", url);
var client = new HttpClient(handler);
response = await client.GetAsync(url);
client.Dispose();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Resource leak: HttpClient and HttpClientHandler not safely disposed.

If GetAsync throws, the client is never disposed. Additionally, the handler is never disposed since HttpClient by default does not take ownership. Use using declarations and pass disposeHandler: true.

🛠️ Proposed fix
             if((uri.Host == "localhost" || uri.Host == "127.0.0.1") && uri.Scheme == "https")
             {
                 var handler = new HttpClientHandler
                 {
                     ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
                 };

                 _logger.LogInformation("Fetching translations from BTCPay Server at {Url}", url);
-                var client = new HttpClient(handler);
-                response = await client.GetAsync(url);
-                client.Dispose();
+                using var client = new HttpClient(handler, disposeHandler: true);
+                response = await client.GetAsync(url);
             }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
var handler = new HttpClientHandler
{
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};
_logger.LogInformation("Fetching translations from BTCPay Server at {Url}", url);
var client = new HttpClient(handler);
response = await client.GetAsync(url);
client.Dispose();
var handler = new HttpClientHandler
{
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};
_logger.LogInformation("Fetching translations from BTCPay Server at {Url}", url);
using var client = new HttpClient(handler, disposeHandler: true);
response = await client.GetAsync(url);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Translator/Services/TranslationExtractor.cs` around lines 38 - 46, The
HttpClientHandler and HttpClient created in the code block are not safely
disposed. Replace the manual instantiation and disposal pattern with using
declarations to ensure proper cleanup even if GetAsync throws an exception.
Specifically, wrap both the HttpClientHandler and HttpClient creation in using
statements, and pass disposeHandler: true to the HttpClient constructor so that
the handler is properly disposed when the client is disposed. Remove the manual
client.Dispose() call and instead rely on the using block to handle cleanup
automatically.

@NicolasDorier

Copy link
Copy Markdown
Member

@teamssUTXO anything missing here or it can be merged?

@teamssUTXO

Copy link
Copy Markdown
Collaborator

LGTM

@NicolasDorier
NicolasDorier merged commit 6423b01 into btcpayserver:main Jun 23, 2026
2 checks passed
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.

3 participants