Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt test to recently updated Arabic translation #2236

Closed
1 task done
bschmalhofer opened this issue Mar 18, 2023 · 2 comments
Closed
1 task done

Adapt test to recently updated Arabic translation #2236

bschmalhofer opened this issue Mar 18, 2023 · 2 comments
Assignees
Labels
unittests Requests wrt unittests
Milestone

Comments

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Mar 18, 2023

A new test failure surfaced in scripts/test/Layout/HumanReadableDataSize.t.

[13:00:34] /opt/otobo/scripts/test/Layout/HumanReadableDataSize.t ...................................................... 
# Seeded srand with seed '20230318' from local date.
ok 1 - HumanReadableDataSize( Size => abc)
ok 2 - HumanReadableDataSize( Size => undef)
ok 3 - HumanReadableDataSize( Size => 0)
ok 4 - HumanReadableDataSize( Size => 13)
ok 5 - HumanReadableDataSize( Size => 1024)
ok 6 - HumanReadableDataSize( Size => 2500)
ok 7 - HumanReadableDataSize( Size => 2500)
not ok 8 - HumanReadableDataSize( Size => 2500) (is '�2.4 ����با�ت (KB)' should be '2.4 KB')
ok 9 - HumanReadableDataSize( Size => 46137344)
ok 10 - HumanReadableDataSize( Size => 58626123)
ok 11 - HumanReadableDataSize( Size => 58626123)
not ok 12 - HumanReadableDataSize( Size => 58626123) (is '�55.9 ��غابا�ت (MG)' should be '55.9 MB')
ok 13 - HumanReadableDataSize( Size => 34359738368)
ok 14 - HumanReadableDataSize( Size => 64508675518)
ok 15 - HumanReadableDataSize( Size => 64508675518)
not ok 16 - HumanReadableDataSize( Size => 64508675518) (is '�60.1 غ�غابا�ت (GB)' should be '60.1 GB')
ok 17 - HumanReadableDataSize( Size => 238594023227392)
ok 18 - HumanReadableDataSize( Size => 498870572100000)
ok 19 - HumanReadableDataSize( Size => 498870572100000)
not ok 20 - HumanReadableDataSize( Size => 498870572100000) (is '�453.7 ت�رابا�ت (TB)' should be '453.7 TB')
1..20
Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/20 subtests 

Looks like this is due to the changed Arabic translation:

grep -r تيرابايت Kernel/ i18n/
Kernel/Language/ar_SA.pm:        '%s TB' => '‎%s تيرابايت (TB)',
i18n/otobo/otobo.ar_SA.po:msgstr "‎%s تيرابايت (TB)"

TODO:

  • update the test script
@bschmalhofer bschmalhofer added the unittests Requests wrt unittests label Mar 18, 2023
@bschmalhofer bschmalhofer added this to the OTOBO 10.1 milestone Mar 18, 2023
@bschmalhofer bschmalhofer self-assigned this Mar 18, 2023
@bschmalhofer
Copy link
Contributor Author

The translation looks sane:

uni -c "تيرابايت"
ت - U+0062A - ARABIC LETTER TEH
ي - U+0064A - ARABIC LETTER YEH
ر - U+00631 - ARABIC LETTER REH
ا - U+00627 - ARABIC LETTER ALEF
ب - U+00628 - ARABIC LETTER BEH
ا - U+00627 - ARABIC LETTER ALEF
ي - U+0064A - ARABIC LETTER YEH
ت - U+0062A - ARABIC LETTER TEH

@bschmalhofer
Copy link
Contributor Author

Adapted the test script. Test result looks fine. One TODO test because of spelline (MB) vs. (MG). Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unittests Requests wrt unittests
Projects
None yet
Development

No branches or pull requests

1 participant