• Welcome to Simple Machines Community Forum. Please login or sign up.
October 24, 2021, 09:49:04 PM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


[2.0.18] Non-UTF-8 languages are not install

Started by davidhs, February 12, 2021, 05:06:19 PM

Previous topic - Next topic

davidhs

This happens in my mods. I tested with some languages (french, portuguese_pt/brazilian, russian, spanish_es/latin). With english and english_british works fine.

I saw this in prevoius version of SMF (2.0.17) and thought the problem was from my files (they add lines, not many, to modification-lang.xml). In page of package install any error is not shown. Show "Test successful" but without the triangle at left with actions.

With current version (2.0.18) I tested again and this failed, again.
Then I tested with previous versions and this failed since 2.0.13 (in SMF 2.0.12 install correctly).

shadav

not sure that I fully understand what you mean

when you install a mod, there's no language files or utf-8 files?
Not all mod creators translate their mods into other languages or even into english utf-8
if you check the posts in that mods support topic a lot of times users will post translations that they have made.

live627


shawnb61

I'm not sure what the issue here is, either.

If you are running utf8, you must install the utf8 versions of the languages.  If you are not running utf8, you need the non-utf8 versions.  You need to be consistent.  SMF will only work on the language files consistent with your settings.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

davidhs

There is a typo in my first post. I wrote
modification-lang.xml
instead of
modification-lang.php

Quote from: shadav on February 12, 2021, 05:22:30 PM
not sure that I fully understand what you mean

when you install a mod, there's no language files or utf-8 files?
Not all mod creators translate their mods into other languages or even into english utf-8
if you check the posts in that mods support topic a lot of times users will post translations that they have made.
First of all, I am testing my mods (wrotten by me), not mods by others. And in my mods I added some languages (english/british, spanish_es/latin, in utf8/non-utf8, and other translations made by other users).
Before test my mods in SMF 2.0.18, I installed this forum (an empty instalation) with all languages (utf8 and non-utf8) used by my mods.




Quote from: live627 on February 12, 2021, 09:22:15 PM
D o the actual  files get modified?
Not all, only english/british, and utf8 files are modified
Modifications.english.php
Modifications.english_british.php
Modifications.english_british-utf8.php
Modifications.english-utf8.php
Modifications.french-utf8.php
Modifications.spanish_es-utf8.php
Modifications.spanish_latin-utf8.php

but the others non-utf8 fils are not modified (this is the bug :( )
Modifications.french.php
Modifications.spanish_es.php
Modifications.spanish_latin.php





Quote from: shawnb61 on February 12, 2021, 09:29:37 PM
I'm not sure what the issue here is, either.

If you are running utf8, you must install the utf8 versions of the languages.  If you are not running utf8, you need the non-utf8 versions.  You need to be consistent.  SMF will only work on the language files consistent with your settings.
I install this forum with more than one languages (and utf8 and non-utf8 versions) because it is a test forum and I need know if all languages of my mods works (because of this I could see this error).




I collaborate in an online forum where we use spanish_es-utf8. Today I copied Modifications.spanish_es.php (not utf8) and install one of my mods and happens same error.

I put here an example. I have an empty forum with SMF 2.0.18 (with 2.0.17 is same) and some languages:
- english, english-utf8, english_british, english_british-utf8,
- french, french-utf8,
- portuguese_brazilian, portuguese_brazilian-utf8,
- russian, russian-utf8,
- spanish_es, spanish_es-utf8, spanish_latin, spanish_latin-utf8

I want install my mod Enhancements to reattribute posts, 1.5.10 https://custom.simplemachines.org/mods/index.php?mod=2507
This mod can install over these languages:
- english, english-utf8, english_british, english_british-utf8,
- french, french-utf8,
- portuguese_pt, portuguese_pt-utf8, portuguese_brazilian, portuguese_brazilian-utf8,
- russian, russian-utf8,
- spanish_es, spanish_es-utf8, spanish_latin, spanish_latin-utf8
* In forum I have not these languagues

Some files of this mod are:
Code (package-info.xml) Select
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ATTENTION: If you are trying to install this manually, you should try
the package manager. If it will not work for you, please take a look
at the following for information on this format:
https://wiki.simplemachines.org/smf/Manual_installation_of_mods
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>davidhs:ReattributePostWithNr</id>
<name>Enhancements to reattribute posts</name>
<version>1.5.10</version>
<type>modification</type>

<install for="2.0-2.0.99">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.xml</modification>
<modification type="file" format="xml">languages-2.0/english.xml</modification>
<modification type="file" format="xml">languages-2.0/english-utf8.xml</modification>
<modification type="file" format="xml">languages-2.0/english_british.xml</modification>
<modification type="file" format="xml">languages-2.0/english_british-utf8.xml</modification>
<modification type="file" format="xml">languages-2.0/french.xml</modification>
<modification type="file" format="xml">languages-2.0/french-utf8.xml</modification>
<modification type="file" format="xml">languages-2.0/portuguese_brazilian.xml</modification>
<modification type="file" format="xml">languages-2.0/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml">languages-2.0/portuguese_pt.xml</modification>
<modification type="file" format="xml">languages-2.0/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml">languages-2.0/russian.xml</modification>
<modification type="file" format="xml">languages-2.0/russian-utf8.xml</modification>
<modification type="file" format="xml">languages-2.0/spanish_es.xml</modification>
<modification type="file" format="xml">languages-2.0/spanish_es-utf8.xml</modification>
<modification type="file" format="xml">languages-2.0/spanish_latin.xml</modification>
<modification type="file" format="xml">languages-2.0/spanish_latin-utf8.xml</modification>
<redirect url="$scripturl?action=admin;area=maintain;sa=members;$session_id" timeout="6000">redirect.txt</redirect>
</install>
<install for="2.1...">[...]</install>

<uninstall for="2.0-2.0.99">[...]</uninstall>
<uninstall for="2.1...>[...]</uninstall>

</package-info>

Code (languages-2.0/spanish_es.xml (saved in ANSI)) Select
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>davidhs:ReattributePostWithNr</id>
<version>1.5.10</version>

<file name="$languagedir/Modifications.spanish_es.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
// BEGIN MOD ReattributePostWithNr
$txt['reattribute_any'] = 'Cualquier dirección de email o nombre de usuario';
$txt['reattribute_post_no_guest'] = 'Adjudicar posts que no son de invitado';
// More...
// END MOD ReattributePostWithNr
]]></add>
</operation>
</file>

</modification>

Code (languages-2.0/spanish_es-utf8.xml (saved in UTF-8)) Select
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>davidhs:ReattributePostWithNr</id>
<version>1.5.10</version>

<file name="$languagedir/Modifications.spanish_es-utf8.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
// BEGIN MOD ReattributePostWithNr
$txt['reattribute_any'] = 'Cualquier dirección de email o nombre de usuario';
$txt['reattribute_post_no_guest'] = 'Adjudicar posts que no son de invitado';
// More...
// END MOD ReattributePostWithNr
]]></add>
</operation>
</file>

</modification>


When I try install this mod I see page as attachment image:
- portuguese_brazilian and portuguese_brazilian-utf8 are skip because I have not those lenguages installed, this is correct.
- non-UTF-8 languages (except English) are not added to modification-lang.php, but all are marked as "Test successful". This is the bug.

And if I install in SMF 2.0.12 and previous, all is correct. In 2.1 series works also.

Advertisement: