Support ⇒ Dragonfly CMS v10 ⇒ Installation language errors ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexDragonfly CMS v10

Installation language errors Reply to topic


I'm installing last version of CMS and I founded some language errors.

PHP it's trying to load constants from language files into includes/l10n/, but constants are into dragonfly subfolder and don't found it.

I found some solutions:
- Change constants to main.php into includes/l10n
- Create this texts into installation language files.

To try to contribute in the same line, what it's de best solution in this case. I have files changed into my pc and I waiting to push it to CVS from an answer to push the correct ones.

until the next (Bye),

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Dragonfly 9.2 (PHP5.4)


  1. Clone bitbucket.org/dragonfl...onfly-cms/
  2. Pull your clone to your local PC
  3. Commit the changes
  4. Push your changes
  5. Create a pull request at bitbucket.org/dragonfl...-requests/

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


I know system to create pull request and pull changes.

I ask for what solution is more "dragonfly PHILOSOPHY":
1. Create new language strings into installation files
2. Move existent string to another path (from /includes/l110n/dragonfly to /includes/l10n) and don't duplicate strings.

Which is the best solution?

Thanks

until the next (Bye),

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Dragonfly 9.2 (PHP5.4)


Ah you mean: /includes/l10n/en/dragonfly/*.php vs /includes/l10n/en/*.php

Only step 4 and 5 currently load the L10N system with \Dragonfly::getKernel()->L10N->load('main');
This actually loads two files:
- /includes/l10n/en/dragonfly/kernel.php (by the L10N constructor)
- /includes/l10n/en/main.php (by the L10N->load())

However, you can load it anywhere you want with:
\Dragonfly::getKernel()->L10N['Account']; \Dragonfly::getKernel()->L10N->get('Account');
This automagically loads /includes/l10n/en/dragonfly/kernel.php which has array data, not constants.

The new L10N is not using constants for the benefit of easier loading.
Say we add a new variable, then German uses the English version until added.

With constants this is not possible, you will get loads of notices in your PHP error log ("already defined").

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Sun Jul 01, 2018 9:44 pm; edited 2 times in total


I'm trying to use language from includes/l10n files and I found a problem that only load "en" files.

It's possible that krsot functions in "includes/dragonfly/l10nl10n.php - line 88" and "includes/load/instal.php - line 74" was wrong and you want to use ksort? It's not normal to order array with selected language from cookie to final.

In the same way krsort in "includes/load/instal.php - line 74" maybe must to move to before foreach in line 76.

Thanks

until the next (Bye),

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Dragonfly 9.2 (PHP5.4)


krsort is correct, but something else is wrong. Will check what the problem is.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


I tried to push changes into repository and don't have permisions. I attach you diff changes since I have permisions.

You have to change file extension from .txt to .diff
Attachment: languagePatch.diff.txt
Description
Filename languagePatch.diff.txt
Filesize 204.00 KiB
Downloaded 2 Time(s)
You are not allowed to view/download this attachment

until the next (Bye),

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Dragonfly 9.2 (PHP5.4)


Got them, will see what i can do with it. Thanks!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


L10N repo updated with your code bitbucket.org/dragonfl...e0662fcd05

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

All times are UTC


Jump to: