?
avatar lisandroTSilva
lisandroTSilva
16 Dec 2019

Steps to reproduce the issue

Manage > Extensions > Install

  • Install the extension plugin with any language, use this example here.

Expected result

image

Actual result

image

System information (as much as possible)

Configuração Valor
 
PHP executando em Windows NT 134389-PC 10.0 build 18362 (Windows 10) AMD64
Tipo de banco de dados mysql
Versão do Banco de Dados 5.5.5-10.1.40-MariaDB
Colação do Banco de Dados utf8mb4_general_ci
'Collation' da conexão com o banco de dados utf8mb4_general_ci
Versão PHP 7.3.10
Servidor Web Apache/2.4.39 (Win64) OpenSSL/1.1.1b PHP/7.3.10
Interface PHP com servidor Web apache2handler
Versão do Joomla Joomla! 3.9.13 Stable [ Amani ] 5-November-2019 15:00 GMT
Versão da Plataforma Joomla Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Navegador do Usuário Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36

Additional comments

If you install again the constant is found.

avatar lisandroTSilva lisandroTSilva - open - 16 Dec 2019
avatar joomla-cms-bot joomla-cms-bot - change - 16 Dec 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 16 Dec 2019
avatar brianteeman
brianteeman - comment - 16 Dec 2019

Without seeing the extension it is impossible to comment

avatar lisandroTSilva
lisandroTSilva - comment - 16 Dec 2019

@brianteeman please, read the issue.

An example of the Joomla documentation itself was used. It's at https://github.com/lisandroTSilva/profile5, which was documented in this issue.

Example used can be found at https://docs.joomla.org/Creating_a_profile_plugin

avatar brianteeman
brianteeman - comment - 16 Dec 2019

not checked but I see in the original

The supplemental fields are created within the profile.xml file in the profiles folder.

avatar lisandroTSilva
lisandroTSilva - comment - 16 Dec 2019

@brianteeman supplemental fields are not the focal point of this problem, so the code has been simplified and unnecessary files have been removed in commit lisandroTSilva/profile5@3a3fc9c

avatar SharkyKZ
SharkyKZ - comment - 17 Dec 2019

There is an error in documentation. Language file structure in installation packages should follow the same convention as everywhere else. Language files should be in language/xx-XX folders where xx-XX is the language code.

This should work:

<languages folder="language">
	<language tag="en-GB">en-GB/en-GB.plg_user_profile5.ini</language>
	<language tag="en-GB">en-GB/en-GB.plg_user_profile5.sys.ini</language>
</languages>

Can be simplified when shipping only 1 language:

<languages folder="language/en-GB">
	<language tag="en-GB">en-GB.plg_user_profile5.ini</language>
	<language tag="en-GB">en-GB.plg_user_profile5.sys.ini</language>
</languages>

And from 3.10 language prefix for files will no longer be required:

<languages folder="language">
	<language tag="en-GB">en-GB/plg_user_profile5.ini</language>
	<language tag="en-GB">en-GB/plg_user_profile5.sys.ini</language>
</languages>
avatar lisandroTSilva
lisandroTSilva - comment - 17 Dec 2019

@SharkyKZ i think your point interesting, but in what adds to the resolution of the problem? Were the above steps performed with the supposed correction suggested? Have positive results been obtained?

There is an error in documentation. Language file structure in installation packages must follow the same convention as everywhere else. Language files must be in language/xx-XX folders where xx-XX is the language code.

I made the suggested change to keep a clear conscience, but that doesn't solve the problem. Although I believe that we should follow the conventions, the obligation cited does not correspond to the result obtained, ie any definition will work. On the other hand, I think that if there is a need to define this information in the XML file, the convention mentioned will be waived.


I will leave this comment here for historical reasons but @SharkyKZ was correct in his observation. This was just supplemented in the comment below.

avatar infograf768
infograf768 - comment - 17 Dec 2019

@lisandroTSilva
Not sure you understood what @SharkyKZ explained above.
Basically, the language files should be put into the plugin specific language folder.
The code he proposes also install them in the core language folders but it is not even necessary.
Here is a typical structure:

Screen Shot 2019-12-17 at 11 44 36
and the xml

Screen Shot 2019-12-17 at 11 47 20

FYI, the xml description is picked from the sys.ini file

avatar lisandroTSilva
lisandroTSilva - comment - 17 Dec 2019

@SharkyKZ actually did the test wrong. So thank you very much.
@infograf768 This may seem like a silly question, but is this behavior valid for all extensions?

avatar infograf768
infograf768 - comment - 17 Dec 2019

It is valid for all extensions and @SharkyKZ explained it quite well: Language files should be in language/xx-XX folders where xx-XX is the language code.
Choosing to also install these files in the core language folders is then the decision of the developer.

avatar lisandroTSilva
lisandroTSilva - comment - 17 Dec 2019

OK thank you

avatar lisandroTSilva lisandroTSilva - change - 17 Dec 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-12-17 11:48:21
Closed_By lisandroTSilva
avatar lisandroTSilva lisandroTSilva - close - 17 Dec 2019

Add a Comment

Login with GitHub to post a comment