How to correct phrases

Hi,

I understand Dolibarr is originally a French software. Translation into English seems quite good overall (I’m no native speaker either), but at times, I’d like to correct phrases (especially regarding all customer-facing information).

For example, the (amazing :happy: ) feature to allow clients to perform Paypal payments shows this phrase:

This screen allow you to make an online payment to…

If anything, it should be “allows”, not “allow”. Is there a way in the frontend to correct such typos, or (even better), to completely customize/ rewrite the text?

My hope would be that I don’t need to edit any php files directly, but if that’s the only way, would I then have to edit (for example) newpayment.php? (I got the file name from the URL).

Thanks a lot

Hi Gert,
Check
Home->Setup->Translation

Hi ariffidaali,

Thanks a lot, this look promising - but I’m afraid I’m missing a step.

Here’s what I did:

“Current language” was en-US, but I switched it to en_CA, and I added an entry in the translation table as follows:

Language: en_CA
Key: This screen allow you to make an online payment to
New Translation string to show: This screen enables you to make an online payment to

But when I follow the payment link, it still shows the original text (not my translation string). I even recreated the invoice, but no avail either.

I forgot to mention: The language was en_US, but I just switched it to en_CA

Hi,
You might also need to change language files located at the langs folder-> en-US (en_CA will use en-US as base). Open the appropriate folder for the module and change the .lang file.

1 Like

.
That is an error: it needs to be corrected.

Yes you can override that phrase with your own version, but that doesn’t help anyone but yourself.

First check the en_US file and correct that on Github. These changes in en_US will eventually be copied to the other language files.

Changes to all other languages should be done via the Dolibarr section of Transiflex.

Once you have done that and helped everyone, you can correct your local file with the same changes, knowing that in the future they will be included in Dolibarr.

Most of the english en_US should be ok as I went through the Develop files last year and corrected as much as I could without knowing all the contexts,

Thank you ariffidaali.

I’ll have to do this over the weekend, but I’m glad to hear about the “lang” files. I usually avoid editing php files because they tend to not survive updates, but separate lang files seem like a decent solution.

Much appreciated,

Gert

Thank you ariffidaali.

I’ll have to do this over the weekend, but I’m glad to hear about the “lang” files. I usually avoid editing php files because they tend to not survive updates, but separate lang files seem like a decent solution.

Much appreciated,

Gert

Thank you ariffidaali.

I’ll have to do this over the weekend, but I’m glad to hear about the “lang” files. I usually avoid editing php files because they tend to not survive updates, but separate lang files seem like a decent solution.

Much appreciated,

Gert

Thank you for your feedback torvista.

I’m a total newbie with Dolibarr (using it only since a few weeks), and before I assume any bugs, I really want to make sure I explored all available options, so “let me help them to fix the source code” is not a conclusion that comes to mind easily :wink: . That being said, I’ll gladly contribute to the project with translations and/ or text edits, and I’ll check out “Transiflex”. Regarding Github - I don’t think you want me to fiddle around there :blush:

But please allow me to share a thought regarding client or supplier facing text (checkout pages, invoices, order confirmations etc.): I believe that no matter how good the text is, folks will always want to customize it, for example they may want to use their own terminology (payment - donation - funding - even “energy exchange” is being used by some, e. g. in the Yoga community). I believe there’s no way you could find a “one fits all” solution.

Therefore, maybe the following could be an option (and I’m just sharing a thought here): Rather than having the text fairly hard coded, wouldn’t it make sense to simply use variables that can hold complete html text? This way folks could write any text they like, and format it. Also, it would make the translation easier because the “base text” would only be the variable name, e. g. PAYPAL_CHECKOUT_TEXT

It would save you the hassle having to maintain Github branches (or at least alleviate it), while at the same time, it would give users more flexibility.

I’m aware that this post is under the “how to” category, not in the “suggestion/ wishlist”, I’m only sharing it here because the topic came up.

That’s my 2 cents…