I was always interested in online translations. So I asked my friend chatgpt to help me translate empty.po to Arabic just to see how they behave as an AI gurus. They failed saying the best for me is to use googletranslate and they offered me help with a python script. The script that uses googletranslate failed also, so they suggested deep-translate. After many tries and errors I came out with this script. I use Linux Zorin which is a flavour of Ubuntu. So for the script to run one needs to install python3 and the other modules for it to work.
So here we go.

to install python 3

 sudo apt install python3 

After python 3 installation

 pip install deep-translator 

And

 pip install polib 

And here is the script which I called translate.py

import time
import re
from deep_translator import GoogleTranslator
from polib import pofile

# Load the .po file
po_file = pofile('empty.po')

# Update the Content-Type in the header to UTF-8
po_file.metadata['Content-Type'] = 'text/plain; charset=UTF-8'

# Initialize the translator
translator = GoogleTranslator(source='auto', target='ar')

# Define a regex pattern to match `&` before or after an alphanumeric character
mnemonic_pattern = re.compile(r"(?<=\w)&|&(?=\w)")

# Counters for statistics
total_entries = len(po_file)
translated_count = 0
failed_count = 0

# Start the timer
start_time = time.time()

# Process each entry in the .po file
for entry in po_file:
    # Translate if msgstr is empty
    if not entry.msgstr:
        try:
            print(f"Translating: {entry.msgid}")  # Debug print
            translated_text = translator.translate(entry.msgid)
            
            # After translating, remove mnemonics from the translated text
            entry.msgstr = re.sub(mnemonic_pattern, "", translated_text)
            
            translated_count += 1
            print(f"Translated: {entry.msgstr}")  # Debug print
            
        except Exception as e:
            print(f"Warning: Failed to translate '{entry.msgid}' due to {e}")
            entry.msgstr = "Translation Failed"
            failed_count += 1
    else:
        # If already translated, remove mnemonics from the existing translation
        entry.msgstr = re.sub(mnemonic_pattern, "", entry.msgstr)

# Ensure all msgstr values are not None before saving
for entry in po_file:
    if entry.msgstr is None:
        entry.msgstr = ""

# Calculate the elapsed time
end_time = time.time()
elapsed_time = end_time - start_time

# Convert elapsed time to hours, minutes, and seconds
hours, rem = divmod(elapsed_time, 3600)
minutes, seconds = divmod(rem, 60)

# Save the translated .po file
output_filename = 'translated_arabic.po'
try:
    po_file.save(output_filename)
    print(f"\nTranslation complete. The file is saved as '{output_filename}'")
except Exception as e:
    print(f"Error saving the file: {e}")

# Print translation statistics
print("\n--- Translation Statistics ---")
print(f"Total entries: {total_entries}")
print(f"Successfully translated: {translated_count}")
print(f"Failed to translate: {failed_count}")
print(f"Elapsed time: {int(hours)}h {int(minutes)}m {int(seconds)}s")

In the script I had to get rid of the & keyboard mnemonic as it does not work in any translation and should be changed in the code. i.e &Items is not translatable to what it should do once one presses Alt-I.

The above script is for Arabic as target='ar'
It works for most languages just by specifying the target language. i.e I tried it for Tamil target='ta'. It works. Do not forget to change the output_filename = 'translated_arabic.po' to whatever you like.


To run the scrip

 python3 translate.py 

As of all online translations its OK at about 70%. The rest is out of context and needs to be edited manually. Thats where one uses poedit to correct the 30%.

Just note. It took 40 minutes for Arabic Translation with 6 errors and 28 minutes for Tamil Translations with no errors. Total strings translated 3498.

Its a good idea to mention your environment.
Also
1. Remove Browser cache.
2. Use different browser.
3. https://frontaccounting.com/punbb/viewtopic.php?id=8570
4. Use debug and look into errors.log

3

(3 replies, posted in Items and Inventory)

Make sure you activate the extension for the company you are working on.
Setup->Install/Activate extensions->Available and/or Installed-> Pull down menu and choose the Company with Activate For 'Name of your Company'.

4

(2 replies, posted in Accounts Receivable)

Preferences -> Transaction days will increase the search range.

5

(8 replies, posted in Installation)

Try with a different theme i.e Default.

There is an extension called Annual Balance Breakdown - Detailed. Try it. You might find what you need in it.

7

(4 replies, posted in Items and Inventory)

1. Inventory Reports might have what you are asking for, unless I misunderstood your requirements.
2. In config.php

        Optional popup search enabled if this is true.
    $max_rows_in_search = 10 is used for maximum rows in search
*/
    $use_popup_search = true;
    $max_rows_in_search = 100;

I have to admit Godady is loosing it. Their support is deteriorated. By removing locals they are forcing people to buy dedicated server in order to increase revenue.  There is no way to install locales on a shared server even if you have access to a terminal( which I have thru ssh) because most of the commands are disabled.

@AhmedSelim is correct. GoDaddy removed all locales other than English.
In linux hosting locale -a lists only en_ languages . all others disappeared.
You need to contact GoDaddy and ask them to install ar_EG locale for you.

10

(3 replies, posted in Translations)

.../lang/new_language_template/LC_MESSAGES/empty.po has all the translatable strings.

IMHO the best way to do what @diventi.enterprises needs is to follow the wiki as in
https://frontaccounting.com/fawiki/index.php?n=Main.TaxSystem
Study whats in Using the Tax System. You will find what you looking for with an example.

Try Setup>Company Setup and tick Search Customer List and Seach Suppliers List and see if it helps.

https://frontaccounting.com/punbb/viewtopic.php?id=8700

I recommend you issue a bug report in Mantis.  This looks like a bug to me.

@msuhail197
You have already encountered this problem a long time ago as in:
https://frontaccounting.com/punbb/viewtopic.php?id=8220&p=2
How did you resolve it?
Just follow the same route.

Enable debug and look at the contents of errors.log

Yes it did. For me it did not make sense as the error was coming from outside the Module and I think it is from the core. If you look at it the insert fields do not tally with what is in the csv file. Here is the error:

10-Nov-2023 01:31:32 Europe/Berlin] <b>DATABASE ERROR :</b> order Cannot be Added<br>error code : 1265<br>error message : Data truncated for column 'prep_amount' at row 1<br>sql that failed was : INSERT INTO 0_sales_orders (order_no, type, debtor_no, trans_type, branch_code, customer_ref, reference, comments, ord_date,
        order_type, ship_via, deliver_to, delivery_address, contact_phone,
        freight_cost, from_stk_loc, delivery_date, payment_terms, total, prep_amount)
        VALUES ('9','0','1', '30','1', '009/2017','auto','','2017-12-20', '1', '1','Donald Easter LLC','N/A', '', '0', 'DEF', '2017-12-20','4','70','')<br><br><br>

And here's the contents of the csv file

customer_id,branch_No,reference,date,payment_id,sales_type_name,dimension_id,dimension2_id,item_code,item_description,quantity,unit,price,discountpercentage,freightcost,delfrom,deldate,delto,deladdress,contactphone,email,custref,shipvia,comments,ex_rate
1,1,009/2017,2017/12/20,4,Retail,,,202,Maintenance,2,Each,35,0,,DEF,2017/12/20,Mr A,1 Abe Street Glasgow G32 FHT,984578545,customer@example.in,,,,
1,1,010/2017,2017/12/21,4,Retail,,,202,Maintenance,2,Each,15,0,,DEF,2017/12/21,Mr A,1 Abe Street Glasgow G32 FHT,984578545,customer@example.in,,,,

I looked at apmuthu file. It did work for FA 2.4.4 after that I tested at 2.4.8 it did not and nothing after that. Not at 2.4.17. I dont know why. Could not figure it out.

@poncho1234
Yes the Allow Entry on non closed Fiscal Years is found in Access Setup under Banking and GL configuration.
I will take a look at apmuthu file and revert back here.

@pstevens
I have to admit its not easy to crack Import Transactions module. But once you link all fields correctly then its a piece of cake and you will be proud of yourself. From experience and maybe you have done this already you have to:

Reference should tally i.e If you want to import 004/2022 then your pattern should be {001}/{YYYY} and you make sure 004/2022 does not exist in the system. Also the system will not accept blank reference. It accepts a space (NULL). All fields in the spreadsheet should also be formatted accordingly..i.e Reference is General and Date is Date with the identical date format...etc..Also make sure the Fiscal Year that you are posting into is active and the Banking and GL Configuration has the Allow entry on non closed Fiscal years ticked.

Hope this will help.

Create a 2023 fiscal year and try again. No need for it to be the current. Try with active and not active 2023.
Good luck.

@yubrajkafle99

You need to describe in details what you did to reach this stage. The error clearly mentions a problem in fiscal years for the date entered. So please list your fiscal years opened/closed and your current fiscal year. and to what date you are changing the transaction date.

23

(2 replies, posted in Setup)

Just enter 1001/23 manually in the reference field.  The next quote will automatically be 1002/23.

24

(7 replies, posted in Wish List)

Thanks @joe for all of your efforts.

25

(7 replies, posted in Wish List)

@joe,

I think the one who asked this wants to search for invoices by Reference No. He does not want to go thru a list of invoices looking for that specific one. Especially when this list is too big.