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

No headers issue #54

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open

No headers issue #54

wants to merge 25 commits into from

Conversation

Valc
Copy link
Contributor

@Valc Valc commented Feb 23, 2022

@infograf768
@yaroslaw74
Here is the first attempt trying to solve the issue that is opened here:
#53

To test, after apply this patch, i have used the shared language files without save in raw or normal edition the "en-GB" version, due seems the patch needs to work also when the en-GB file is updated.

Before the patch, editing the en-GB file and saving it in normal mode the headers was created automaticaly by com_localise code but the first string was deleted from en-GB and then displayed as "not in ref" at "ru-RU".

The issue is maninly due the reference file have no headers, and for me that one is a format issue than should send a warning message when present (not implemented at the moment but easy to do it wthin this patch) and is suggested contact with the author to ask if is posible add to the header, at least, the copyright and license info.

Please, test it and let me know if we add a warning message and how is working also testing with files with headers or real not in ref keys.

Regards,

@infograf768
Copy link
Owner

tks, will test later.

@infograf768
Copy link
Owner

infograf768 commented Feb 26, 2022

@Valc @yaroslaw74

This patch works fine here. No side effect when we need a real Not in Reference, for French for example.

@yaroslaw74
Please test by replacing TranslationModel.php in administrator/components/com_localise/Model/TranslationModel.php by the following file

TranslationModel.php.zip

Valc added a commit to Valc/jmlocalise that referenced this pull request Jun 30, 2022
*- Solve "No headers" issue started at infograf768/j4localise#54
*- False positives catched as context comments issue.
*- Add css to "word-break" the en-GB "key/string" to translate at regular edition mode.
*- Add some "padding" using the "<br>" workarrownd beteween the keys cases to display at regular edition mode.
*- Ensure than at regular edition mode will display the en-GB commnent lines presents at the file to translate when "$header" is false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants