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

Added Arabic Translation #2863

Merged
merged 1 commit into from
May 3, 2024
Merged

Added Arabic Translation #2863

merged 1 commit into from
May 3, 2024

Conversation

mohamedali654321
Copy link
Contributor

Added Arabic Translation

Added ar.json5 translation and modified config files to include this translation

List of changes in this PR:

Added Arabic translation
Updated config.example.yml

@tdonohue tdonohue added i18n / l10n Internationalisation and localisation, related to message catalogs 1 APPROVAL pull request only requires a single approval to merge port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release labels Mar 18, 2024
@tdonohue
Copy link
Member

@mohamedali654321 : It looks like this PR is currently failing "lint" (formatting) checks. You can see these locally by running yarn lint. You also may be able to automatically clean them up by running yarn lint --fix (this will fix many things automatically, but may not be able to fix everything)

@alexandrevryghem
Copy link
Member

@mohamedali654321: Could you also restore the comments in the json5 file, these are used to detect outdated translations. So your translation file should look like this:

{
  // "401.help": "You're not authorized to access this page. You can use the button below to get back to the home page.",
  "401.help": "غير مصرح لك بالوصول إلى هذه الصفحة. يمكنك استخدام الزر أدناه للعودة إلى الصفحة الرئيسية.",

  // "401.link.home-page": "Take me to the home page",
  "401.link.home-page": "اذهب إلى الصفحة الرئيسية",
  
  ...
}

@alexandrevryghem
Copy link
Member

alexandrevryghem commented Apr 14, 2024

Hey @mohamedali654321 because I realise that adding all those comments manually back in would have taken quite a while I created a script to fix your translation file. If you enable this option on your PR I think I can push the fix on your branch:
image
If this was already enabled I probably just don't have permissions to do this, so could you run the following commands in the terminal of your angular project:

git remote add alexandrevryghem https://github.com/alexandrevryghem/dspace-angular.git
git fetch alexandrevryghem fixed-ar-i18n-file
git push -fu origin alexandrevryghem/fixed-ar-i18n-file:main

This new translation file also already contains all the other missing translations keys in addition.

The only translation key I did not port was the one for cookies.consent.app.description.google-analytics because it had two different values in your file and I wasn't sure which one was the correct one:

  • "cookies.consent.app.description.google-analytics": "يسمح لنا بتتبع البيانات الإحصائية",
  • "cookies.consent.app.description.google-analytics": "تسمح لنا بتتبع بياناتك الإحصائية",
And these translations are also not included because they don't exist in the english file:
  • "collection.page.browse.recent.head": "أحدث التقديمات", -> I removed this key in `en.json5` since it has been replaced with a search page so this is normal
  • "collection.page.browse.recent.empty": "لا توجد مواد للعرض", -> I removed this key in `en.json5` since it has been replaced with a search page so this is normal
  • "menu.section.notifications_reciter": "مطالبة المنشورات",
  • "quality-assurance.button.detail": "عرض التفاصيل",
  • "person.page.givenName": "الاسم الأول",
  • "submission.sections.submit.progressbar.detect-duplicate": "التكرارات المحتملة",
  • @mohamedali654321
    Copy link
    Contributor Author

    @alexandrevryghem Can you send the script because commenting on a translation line will take a lot of time? Also, the commands sent by you return with an error PS F:\ar-fix\dspace-angular-main> git push -fu origin alexandrevryghem/fixed-ar-i18n-file: main
    fatal: 'origin' does not appear to be a git repository
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

    @alexandrevryghem
    Copy link
    Member

    @mohamedali654321 Try running the command git remote add origin https://github.com/knowledgeWare-Tech/dspace-angular.git. I can give you the script but I don't think it will be very useful for you since using it is not simply executing the command there is still some manual work that needs to be done because this was a one off script so I didn't make it super fancy 😅

    @mohamedali654321
    Copy link
    Contributor Author

    @alexandrevryghem The steps have been followed and the comments have been added, thank you very much

    Copy link
    Member

    @tdonohue tdonohue left a comment

    Choose a reason for hiding this comment

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

    👍 Thank you @mohamedali654321 for your contribution! My apologies it has taken a while to get back to this PR. But, today I tested it out and found that the translation is working. Using Google Translate, I verified a few pages and they all look good. Thanks again.

    @tdonohue tdonohue added this to the 8.0 milestone May 3, 2024
    @tdonohue tdonohue merged commit 3b536a2 into DSpace:main May 3, 2024
    10 of 11 checks passed
    @dspace-bot
    Copy link
    Contributor

    Backport failed for dspace-7_x, because it was unable to cherry-pick the commit(s).

    Please cherry-pick the changes locally and resolve any conflicts.

    git fetch origin dspace-7_x
    git worktree add -d .worktree/backport-2863-to-dspace-7_x origin/dspace-7_x
    cd .worktree/backport-2863-to-dspace-7_x
    git switch --create backport-2863-to-dspace-7_x
    git cherry-pick -x 159b0c29de1dcb9a2aff4c9f4ca663d05b573bf3

    @alexandrevryghem alexandrevryghem removed the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label May 17, 2024
    @alexandrevryghem alexandrevryghem mentioned this pull request May 17, 2024
    6 tasks
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    1 APPROVAL pull request only requires a single approval to merge i18n / l10n Internationalisation and localisation, related to message catalogs
    Projects
    No open projects
    Status: ✅ Done
    Development

    Successfully merging this pull request may close these issues.

    4 participants