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

Language String Translation doesn't translate my strings #9763

Closed
guymass opened this issue Jan 2, 2025 · 40 comments
Closed

Language String Translation doesn't translate my strings #9763

guymass opened this issue Jan 2, 2025 · 40 comments
Labels

Comments

@guymass
Copy link
Contributor

guymass commented Jan 2, 2025

I have several titles on site which do not translate when I edit en_US.php and he_IL.php to translate my strings from English to Hebrew.

Some of my titles are Category Names which also do not translate. So my home page has like a mix of Hebrew and English titles which I want to fix on the Hebrew language.

I have tested on two sites and on both translation doesn't work.

Example of the English strings for translation set in en_US.php:

$t['Friend Request Sent, Awaiting Approval'] = 'Friend Request Sent, Awaiting Approval';
$t['Shorts'] = 'Shorts';
$t['Send Friend Request'] = 'Send Friend Request';
$t['Remove first page'] = 'Remove first page';
$t['view more'] = 'view more';
$t['Most Recent'] = 'Most Recent';
$t['Science and Technology'] = 'Science and Technology';
$t['playlists'] = 'playlists';
$t['culture-and-arts'] = 'culture-and-arts';
$t['Articles'] = 'Articles';
$t['News'] = 'News';
$t['books'] = 'books';

Hebrew translations set in he_IL.php:

$t['Friend Request Sent, Awaiting Approval'] = 'בקשת חברות נשלחה, ממתין לאישור';
$t['Shorts'] = 'קצרים';
$t['Send Friend Request'] = 'שליחת בקשת חברות';
$t['Remove first page'] = 'הסר מדף ראשי';
$t['view more'] = 'קרא עוד';
$t['Most Recent'] = 'התווסף לאחרונה';
$t['Science and Technology'] = 'טכנולוגיה ומדעים';
$t['playlists'] = 'פלייליסטים';
$t['culture-and-arts'] = 'תרבות ואומנות';
$t['Articles'] = 'מאמרים';
$t['News'] = 'חדשות';
$t['books'] = 'ספרים';

After clearing cache several times and refreshing nothing seems to change at all:

Screenshot 5785-04-02 at 17 10 19

@guymass guymass added the bug label Jan 2, 2025
@DanielnetoDotCom
Copy link
Member

This is a category menu that you created.
there are this translation somewhere on the site or is only not translating in the category menu?

@guymass
Copy link
Contributor Author

guymass commented Jan 2, 2025

Yes we are using the categoriesTopButtons menu option to display the categories.

I have noticed also trying to translate the "Most Recent" video category will not take my translation.

Here are some of the thing that do not translate:

Screenshot 5785-04-02 at 23 12 52
Screenshot 5785-04-02 at 23 12 32
Screenshot 5785-04-02 at 23 12 18
Screenshot 5785-04-02 at 23 12 02
Screenshot 5785-04-02 at 23 11 58
Screenshot 5785-04-02 at 23 11 44

@DanielnetoDotCom
Copy link
Member

Please separate the issues, not there are multiple issues in this thread

@DanielnetoDotCom
Copy link
Member

I am not sure what you are doing in the translation, but I have added the translation as it supposed to be in the file (copy from your post)

and I can see it translated.

image

@guymass
Copy link
Contributor Author

guymass commented Jan 3, 2025

I explained what I was doing, just like you I added the strings and their translations in both language files and than I cleared the cache expecting to see it translated but it don't do it on both my sites, IDK.

@DanielnetoDotCom
Copy link
Member

check it here 3b987b3

@guymass
Copy link
Contributor Author

guymass commented Jan 3, 2025

Sorry I don't understand what to check? it appears to be an he_IL.php file. Not sure what you want me to do.

@DanielnetoDotCom
Copy link
Member

Just check what I did, so next time you can do the same.

@guymass
Copy link
Contributor Author

guymass commented Jan 3, 2025

I have done this many times before and it was working just fine, but I haven't translated anything in recent couple of month and only after several updates I decided to translate, finding out it doesn't work for me. Here is how my two files look:

Screenshot 5785-04-03 at 15 25 56

Screenshot 5785-04-03 at 15 25 18

I moved all new strings to the bottom of the file and still it doesn't recognize them. Maybe it will only work on git pull from the master e.g. from you? im not sure really what could be the problem.

@DanielnetoDotCom
Copy link
Member

When you make a translation you may want to make a pull request, so I can check it from my side.

@guymass
Copy link
Contributor Author

guymass commented Jan 4, 2025

But I don't have a branch setup, how do I make the pull request?

@guymass
Copy link
Contributor Author

guymass commented Jan 4, 2025

Sorry, this is too confusing for me and I don't want to mess up things on my server. Do I need to create a fork first? how do I add my own server directory so when I commit changes and make a pull request is goes from my own server to the main branch?

Currently I only make pull requests and I never made a fork, plus I am not sure how to make one from command line as I am not that familiar with git.

Anyway which is simpler?

@guymass
Copy link
Contributor Author

guymass commented Jan 4, 2025

Do I create a fork and then I switch my site and set it to point to my fork? then when I make git pulls or pull requests it goes from the forked git to the main?

Or is it more like me updating the main through my forked branch and then I keep my site still pulling from the master branch, so I don't need to make any changes on my server.

@DanielnetoDotCom
Copy link
Member

In other word, you can have a fork and alway ask git to sync mine and your fork

when you send your changes to mine it is a pull request (I may approve or not)

@guymass
Copy link
Contributor Author

guymass commented Jan 4, 2025

I noticed not I have an old fork named guymass/AVideo which I just synced and updated with the master, so I will try to make the pull requests using it. Please let me know when you receive the requests so I know it is working.

@DanielnetoDotCom
Copy link
Member

That explain your other issues

@guymass
Copy link
Contributor Author

guymass commented Jan 4, 2025

I just now sent two commits regarding the Hebrew translation.

Don't understand what you meant with "That explain your other issues". What are you referring to? The hard reset?

@DanielnetoDotCom
Copy link
Member

This #9765

and this #9767

you are not updating the code properly

@DanielnetoDotCom
Copy link
Member

There are no pull request on my side

@guymass
Copy link
Contributor Author

guymass commented Jan 4, 2025

So to which branch did I not sent those requests? You see why this git hub confuses me.

Screenshot 5785-04-04 at 19 06 50

It also says:

Screenshot 5785-04-04 at 19 13 19

@guymass
Copy link
Contributor Author

guymass commented Jan 4, 2025

Do you see it now?

Screenshot 5785-04-04 at 19 15 31

@eitanwa
Copy link

eitanwa commented Jan 4, 2025

Hi Daniel, maybe this matter is also related to this?
#9760
#9760 (comment)

@DanielnetoDotCom
Copy link
Member

@eitanwa maybe yes

@DanielnetoDotCom
Copy link
Member

@guymass I can see the pull request now, I will review it later

@eitanwa
Copy link

eitanwa commented Jan 4, 2025

@eitanwa maybe yes

Let's hope so
This is a long article :)

@guymass
Copy link
Contributor Author

guymass commented Jan 4, 2025

OK I finally got the git branch sorted out, just in case someone has the same issue its important to use this command:

git checkout master

than do a git pull.

I see some of my translations are now working again so I will close this issue and wait for you to approve my pull requests. I think it will work now.

@guymass guymass closed this as completed Jan 4, 2025
@guymass guymass reopened this Jan 10, 2025
@guymass
Copy link
Contributor Author

guymass commented Jan 10, 2025

Hi Daniel, I still for some reason have problem translating strings to Hebrew. Here are some of the string in screenshots.

Also notice that most of those strings are made by you and are part of the main system and should have a translation.
I checked the language files and those strings are not in them.

Screenshot 5785-04-10 at 12 34 02
Screenshot 5785-04-10 at 12 33 47
Screenshot 5785-04-10 at 12 33 32

What can I do to force the translation? or how can I check the log to locate translation issues?

@DanielnetoDotCom
Copy link
Member

Is this a custom menu?

the problem is for now I cannot translate your assets.

I can only translate the global avideo assets.

I may add something in the future for a custom translation

@guymass
Copy link
Contributor Author

guymass commented Jan 10, 2025

Well that's fine and will be most helpful. But for now title such as the followings are I think belong to avideo assets:

Custom ADs
Videos History
Support
Templates
Connect Mobile App

I think those are required, I don't think we created those titles.

Also I always had the ability to translate the names of menus and categories I created, so what has changed? If I create a category in my own language, shouldn't I be able to provide translation using the language files? otherwise what is the point? because AVideo sites will always have these issues no being able to fully be a multi language site. There will always be an issue of foreign language strings not being translated for custom created menus and categories etc.

I think this is important to at least allow the support on menus and categories names and anything that relates to the UI.

@DanielnetoDotCom
Copy link
Member

  1. Titles such as "Custom ADs," "Videos History," "Support," "Templates," and "Connect Mobile App":
    These titles are part of the standard AVideo UI. If they are not translating as expected, it might indicate that the relevant entries are either missing from the language files or require a code update.

  2. Translating Menus and Categories:

    • For any new categories or menus you create in your environment, AVideo is not yet ready to support translation for these custom additions. However, we recognize the importance of this feature and may add this functionality in the future.
    • Currently, AVideo supports approximately 99% translatability, with 95% of the text strings already included in the language files.
    • Some translations may be prepared but not yet present in the language files.
  3. Identifying Missing Translations:
    To determine which translations are missing or not functioning as expected:

    • Check the language file to confirm if the text exists.
    • If the text exists but does not translate, this indicates that a code update is required.
  4. Next Steps to Resolve Issues:

    • For existing UI strings that are not translating, please provide screenshots of the specific area. This will help identify the location in the code that requires updating.
    • For new menus or categories you create, please note that they currently cannot be translated through the language files. I will keep this in mind for future enhancements to the platform.

@guymass
Copy link
Contributor Author

guymass commented Jan 13, 2025

Thank you for the info and good clarification of the translation process. I am sure you will handle it when the time is right.
Please do so a code update for the following string as they do not translate on my Hebrew template:

"Custom ADs," "Videos History," "Support," "Templates," and "Connect Mobile App":

Screenshot 5785-04-13 at 19 34 44

Also the Menu Headings are missing translation, so whatever you can translate from this section would be helpful for us to have a more concise UI experience.

Also if you need I can give you the Hebrew translations to Copy/Paste for whichever strings you approve of.

@guymass
Copy link
Contributor Author

guymass commented Jan 13, 2025

This should also be translated.

Screenshot 5785-04-13 at 19 47 00

@DanielnetoDotCom
Copy link
Member

Hi

add the translation to the hebrew file then submit a pull request, then I can test from my side why it is not translating.

Do not pull request your personal translations

@guymass
Copy link
Contributor Author

guymass commented Jan 14, 2025

I just sent you a pull request. I set the specific strings to be the top most 10 lines on both language files, US and IL. Please review them and check why they are not translating for me.

@DanielnetoDotCom
Copy link
Member

Approved, and I have the same version as you. what part you are seeing missing translations?

@guymass
Copy link
Contributor Author

guymass commented Jan 14, 2025

These are the strings that still don't translate:
Screenshot 5785-04-14 at 19 14 44
Screenshot 5785-04-14 at 19 14 35
Screenshot 5785-04-14 at 19 14 32
Screenshot 5785-04-14 at 19 14 20
Screenshot 5785-04-14 at 19 14 16
Screenshot 5785-04-14 at 19 14 06

@guymass
Copy link
Contributor Author

guymass commented Jan 14, 2025

I managed now to translate "Videos History" Successfully. I will check maybe the other string will work now as well.

I also was able to translate the category art-and-culture, but I changed it to Art and Culture.

  • translations will not translate strings with '-' dash.
    Also was able now to translate "Photo gellery", it seems that when using multiple words they must have a Capital first letter. When changing it to "Photo Gellery" I was able to make the translation work.

I am writing these here so others will know what to take into consideration.

@DanielnetoDotCom
Copy link
Member

Please take a moment to carefully read the details provided below. It's important to ensure we are on the same page to avoid unnecessary delays in resolving your issues.

I recommend reviewing this link:
#9763 (comment)

This link explains important points, including:

  1. Custom menus or features you create in your environment (e.g., "Most Recent," "Create Live Conference," "Statements/Policy," "Help Center") are not part of the AVideo core code, and therefore, are not managed by me.
  2. Features like "Videos History" or "Connect Mobile App" are not in the current translation files. You can verify this by checking the language files yourself.

Key points from the link:

  • Custom menus or categories you add cannot currently be translated through the language files.
  • If a text string from the standard UI is missing from the translation, it might require an update to the language files or the code itself.

@guymass
Copy link
Contributor Author

guymass commented Jan 14, 2025

OK I was finally able to translate all my strings and now everything looks great on RTL/ Much thanks for all the help, interface looks awesome as well. I am closing this post.

Screenshot 5785-04-14 at 21 04 19

@guymass guymass closed this as completed Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants