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

OLD: Replace all language strings with J2.5 compatible strings #20

Closed
cpaschen opened this issue Sep 29, 2012 · 2 comments
Closed

OLD: Replace all language strings with J2.5 compatible strings #20

cpaschen opened this issue Sep 29, 2012 · 2 comments

Comments

@cpaschen
Copy link
Member

J2.5 requires that all translation strings (the part to the LEFT of the = in the language files) be an entry with NO SPACE (i.e. a 'variable name').

In addition, there are some forbidden entries in the language files:

NULL="Null"
YES="Yes"
NO="No"
TRUE="True"
FALSE="False"
ON="On"
OFF="Off"
NONE="None"

These need to be replaced with:

JNULL="Null"
JYES="Yes"
JNO="No"
JTRUE="True"
JFALSE="False"
JON="On"
JOFF="Off"
JNONE="None"

(although they could be anything you want.

We'll replace them with the above, prepended with COM_TIENDA_

@cpaschen
Copy link
Member Author

HISTORY

Updated by Chris DioscouriChris Paschen. 6 months ago

OK ... the main work of converting all the JText entries is done.

Now just to deal with all the other sub entries to this ticket.

Also, I need someone to check out the above question (in case I need to go back and clean up some more of the Jtext::) http://projects.dioscouri.com/issues/6847#note-20

#20 Updated by Chris DioscouriChris Paschen. 6 months ago

OK ... I have a syntax question...

In the following piece of code (from /admin/videws/config/tmpl/default.php line 29-30):

$legend = JText::('COM_TIENDA_SHOP_INFORMATION');
echo $this->sliders->startPanel( JText::
( $legend ), 'shop' );

In the second line, I have 2 questions:

  1. WHY are we JTEXT'ing $legend? Didn't we just do that with the $legend declaration in the line above?
  2. Is this the equivalent to

$legend.JText::_('shop')

If so, "'shop'" should be changed to "'COM_TIENDA_SHOP'" CORRECT?
So the actual line of code should appear:

echo $this->sliders->startPanel( JText::_( $legend ), 'COM_TIENDA_SHOP' );

#19 Updated by Chris DioscouriChris Paschen. 6 months ago

Alessandro - thanks for those updates. I've added those.

BTW ... I still haven't done the 'cleaning' round on the main language files, so there is probably some duplicates there. I'll get those cleaned up when I get done updating all the other files (very close to that now).

Also ... please be aware that our plans are to deprecate all the existing language files once we get this language update done - so unless you specifically need those other language files right now, it might not be worth the effort of keeping them updated.

#18 Updated by Alessandro Manfré 6 months ago
File en-GB.com_tienda.ini.patch added

I updatede same strings
look in attachment file

#17 Updated by Chris DioscouriChris Paschen. 6 months ago

Alessandro - thanks for catching those.
I've applied those changes.

#16 Updated by Alessandro Manfré 6 months ago
File en-GB.com_tienda.ini.patch added

Hi Chris, I deleted some wrong and duplicated sentences

you can find the patch in attachment

#15 Updated by Chris DioscouriChris Paschen. 6 months ago

FYI ... the admin-side of Tienda (esp. plugins) is presently (from the trunk) NOT complete.
LOTS of untranslated strings.

It looks like we're going to need to make some changes to the structure of the plugins (creating and admin-side language file for each plugin) so that we can make these translatable and ready for J2.5.

Lukas or Alessandro - if you want to create a good 'model' for this change (i.e. the admin-side language file) please feel free to do so and add as a patch so I can review and then apply to the other plugins.

[I'll be back on Monday to continue with this task.]

#14 Updated by Chris DioscouriChris Paschen. 6 months ago

FYI ... on r2515 .. YES, I know that there are some strings that aren't properly entered. I'll get those fixed shortly.
(This is why this is a 'work in progress' getting these language files updated ... WHY did I ever volunteer to take this task :-)

#13 Updated by Chris DioscouriChris Paschen. 6 months ago

FYI ... just a note of clarification on where to put language strings in the ini files.

In the main language files, all phrases that already existing in the code prior to 0.9.0 should be place in the "Content from various earlier versions" section. They should not be placed in 0.9.0 or 0.9.1.

The only language strings that should be added in those areas (i.e. the numbered areas) are ones where the functionality (code) was actually added in 0.9.1 (or whichever specific version).

This is because the tickets associated with language updates are not linked to a specific release and it would be hard to track down the ticket where the code applies to if we add it to the specific version number.

#12 Updated by Chris DioscouriChris Paschen. 6 months ago

Alessandro,

FYI ... r2510 doesn't really apply specificaly to this ticket. It's not a direct JText:: entry. That's a function call to a helper that calls JText::

I know that's being picky, but we need to be sure that we address all the issues and keep track of all these changes - so we don't loose track of what has been done - or duplicate previous work.

I've created a new ticket for updating the helper/function calls like this. Ticket #6917

Also, for the time being, please don't commit directly to the trunk. Please just use patches for now so that we can more easily avoid the hassle of merging code into the trunk.

Thanks for catching that and providing the changes.

#11 Updated by Chris DioscouriChris Paschen. 6 months ago

NOTE: rev 2508 is KNOWN to leave some strings untranslated (esp on the admin-side).
Those will be fixed in the next revision.

#10 Updated by Chris DioscouriChris Paschen. 6 months ago

Note r2481 standardizes all the JText:: entries to be of this format:

JText::_('......')

(Single Quotes, no spaces before/after)

So that we can more easily update the language strings to make them 2.5 compatible.

#9 Updated by Chris DioscouriChris Paschen. 7 months ago

BTW ... we've got a new 'coding standards' area that will help to make sure that our code stays clean and easy to maintain.

You can access it here:

http://projects.dioscouri.com/projects/housekeeping/wiki/Coding_Guidelines

#8 Updated by Chris DioscouriChris Paschen. 7 months ago

Alessandro,

Please do NOT make commits related to the language files at this time.
We are following a process here that will allow us to standardize all of our language entries AND ensure that we get every file manually reviewed.
Although we appreciate the help, this is something that we're just limiting to one person right now to ensure that everything is done completely and consistantly (the present status of language entries is a bit of a mess because so many different people have been creating them. We're hoping to fix all that and prevent it in the future).

#7 Updated by Chris DioscouriChris Paschen. 7 months ago
Target version changed from Version 0.9.0 - Major Core Fixes to Version 0.9.1 - EAV (Custom Fields) Finalization
#6 Updated by Chris DioscouriChris Paschen. 7 months ago

r2468 is last update in 0.9.0 release.

#5 Updated by Chris DioscouriChris Paschen. 7 months ago

This ticket is going to 'migrate' through the next few versions.
I'll be working on it along the way.

I'll put a note here to indicate which releases were in what version number (just to make it easier to track).

NOTE: I'm EXPECTING that we might have some 'issues' along the way as we release different versions (until this is completed). So we might need to release a 0.9.0.a or 0.9.0.b (if the 0.9.1 is not ready yet). These 'lettered' versions will only be for language file updates or critical bugs that are found and fixed (NOTE I said 'critical'). Because the next few versions will be out relatively quickly, we won't release these letter versions unless the changes are 'critical'.

#4 Updated by Chris DioscouriChris Paschen. 7 months ago
Status changed from New to In Progress
#3 Updated by Chris DioscouriChris Paschen. 7 months ago
% Done changed from 0 to 30

NOTE: I'm working on this in 'batches'.

There is a very good chance that at times there will be some language strings that get undefined (i.e. that "COM_TIENDA_LANGUAGE_STRING" appears on the front- or admin-side rather than the translated string.)
That should be done once this process is completed. (which shouldn't be that long now).

#2 Updated by Chris DioscouriChris Paschen. 7 months ago

Following changes made:

NULL="Null" -NOT USED
YES="Yes" => COM_TIENDA_YES
NO="No" => COM_TIENDA_NO
TRUE="True" -NOT USED
FALSE="False" -NOT USED
ON="On" -Not Used
OFF="Off" -NOT USED
NONE="None" -NOT USED

NOTE: We need to be sure to always use these new references when needed.

#1 Updated by Chris DioscouriChris Paschen. 7 months ago

NOTE: Use this regex for searching for the forbidden strings:

^(null|yes|no|true|false|on|off|none)=(.+)\R

Update Log time Watch Copy Delete

@cpaschen
Copy link
Member Author

This is probably done now with the 0.10.0 migration so I'm going to go ahead and close this issue.

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

No branches or pull requests

1 participant