? ? ? Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
1 Jan 2021

Pull Request for Issue #24161 .

Summary of Changes

An easy solution for the problem that translators could try to translate code. It seems that translators did not understand that code must not be tranlated.
Some proposed solutions seem to be rather sophisticated and need some work so this could be a very simple solution:
Add a comment above the Language Key.

Testing Instructions

Code Review

Actual result BEFORE applying this Pull Request

Following the issue description there are translators who ty to translate the code.

Expected result AFTER applying this Pull Request

Translators read the comment and don't touch the code.

Documentation Changes Required

no

avatar chmst chmst - change - 1 Jan 2021
Status New Pending
avatar chmst chmst - open - 1 Jan 2021
avatar joomla-cms-bot joomla-cms-bot - change - 1 Jan 2021
Category Administration Language & Strings
avatar brianteeman
brianteeman - comment - 1 Jan 2021

There will be complaints that they dont see the comments in some translation tools but this is imho the correct way to mark something as not to be translated.

avatar brianteeman
brianteeman - comment - 1 Jan 2021

I have tested this item successfully on 79ea13d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31822.

avatar brianteeman brianteeman - test_item - 1 Jan 2021 - Tested successfully
avatar chmst
chmst - comment - 1 Jan 2021

"we cannot heal stupidity" as you said some time ago. This could help in some way.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31822.

avatar chmst chmst - change - 1 Jan 2021
Title
Add Comment for transators not to touch son lines of code
Add Comment for translators not to touch lines of code
avatar chmst chmst - edited - 1 Jan 2021
avatar horus68
horus68 - comment - 1 Jan 2021

When using crowdin the proper way to comment a line os not placing a commented line above the string but to place the comment at the end of the line to be commented. The coment needs to start with //
It Will display for traslados then.

avatar brianteeman
brianteeman - comment - 1 Jan 2021

If that worked it would be awesome but it doesnt :(
image

image

avatar chmst
chmst - comment - 1 Jan 2021

Maybe in the string itself?

avatar brianteeman
brianteeman - comment - 1 Jan 2021

Just the same - the correct way was to do what this PR does. YCFS

avatar horus68
horus68 - comment - 1 Jan 2021

Well this works for me in another project. See:
$app_strings['LBL_SEARCH_OF'] = ' of '; // Usage: Page # of #

Maybe its only for PHP files?

Note: the comments will be displayed in Crowdin string into the section "Context" this is placed below the value to be translated. You need to click on it to see the contents.

PHP language file (from a different project):
suitecrm_notes1

Crowdin: (see "Context")
suitecrm_notes2

avatar horus68
horus68 - comment - 1 Jan 2021

A final say from me: Adding comments to the end of the string line it works fine with Crowdin as it supposed to be (using a Joomla file). See pictures.
Note: I also Hope some users stop saying nasty things as "we cannot heal stupidity" or YCFS (You Can't Fix Stupid). Do you feel its OK calling "Stupid" to others? No, you have no right to call it to nobody. Please keep your intelligent remarks just for you.
I'm leaving this conversation now.

contact_comments_crowdin
contact_comments_source

avatar brianteeman
brianteeman - comment - 1 Jan 2021

Yes it works in crowdin but the comment is output in joomla :(

avatar richard67
richard67 - comment - 2 Jan 2021

Maybe its only for PHP files?

I think so. The comment syntax of PHP files and ini files is different.

avatar richard67
richard67 - comment - 2 Jan 2021

If Crowdin can't handle ini file syntax (comments starting with a semicolon), it's a Crowdin and not a Joomla issue.

avatar richard67
richard67 - comment - 2 Jan 2021

I have tested this item successfully on 79ea13d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31822.

avatar richard67 richard67 - test_item - 2 Jan 2021 - Tested successfully
avatar richard67 richard67 - change - 2 Jan 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 2 Jan 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31822.

avatar richard67 richard67 - change - 2 Jan 2021
Labels Added: ? ? ?
avatar infograf768
infograf768 - comment - 2 Jan 2021

@horus68
As I wrote in TT forum:

This would throw an error for the file concerned, in core as well as com_localise.
Example: COM_CONTENT_ARTICLE_CONTENT="Content" //commentaire

**Parsing errors in language files**

    JROOT/language/en-GB/en-GB.com_content.ini : error(s) in line(s) 9
    

As for "we cannot heal stupidity" , I do agree with @horus68 .
Many TTs are absolutely not code aware and this should remain present in everybody's mind.

Note:

com_localise displays these comments:

Screen Shot 2021-01-02 at 10 09 12

avatar infograf768 infograf768 - change - 2 Jan 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-01-02 09:15:41
Closed_By infograf768
Labels
avatar infograf768 infograf768 - close - 2 Jan 2021
avatar infograf768 infograf768 - merge - 2 Jan 2021
avatar infograf768
infograf768 - comment - 2 Jan 2021

Tks

Add a Comment

Login with GitHub to post a comment