Skip to main content
Topic: Move agreement to the language dir? (Read 3811 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Move agreement to the language dir?

While working on that:
https://github.com/elkarte/Elkarte/pull/2965/files

I started thinking that maybe move the agreement to the language dir and make it some more consistent with the rest of the internationalized stuff (like  agreement.english.txt instead of agreement.txt for example) would be a nice thing to do.

What do you think?
Bugs creator.
Features destroyer.
Template killer.

Re: Move agreement to the language dir?

Reply #1

Makes a lot of sense to me!

Re: Move agreement to the language dir?

Reply #2

Actually, while re-reading my post, I got another strange idea.
Provided this (even moving the agreement) is to me a 2.0 line of thoughts, I was wondering as well: hmm... in the past it made sense to have language files in php because we were using globals and variables inside strings, etc. But today is more just to have the array handy.
Then why don't we try with JSON or YAML files and a kind of "cache".
I mean: the language files in JSON or YAML, then a kind of "task" that reads the text files and converts them into php files stored in the cache directory (that should become mandatory).

The advantage would be that the integrated language editor would become much easier (no need for fancy tricks to try to avoid php injections) and, if the format is YAML, it should also become easier to direct editing the files (I think).
Of course there is the drawback of having to deal with the "read-text-and-convert-to-php" thing, and the keep it up to date, but being necessary only a once in a while, it shouldn't be that difficult (I hope).

Dunno, random thoughts. lol
Bugs creator.
Features destroyer.
Template killer.


Re: Move agreement to the language dir?

Reply #4

The move is tacked https://github.com/elkarte/Elkarte/issues/2968
Bugs creator.
Features destroyer.
Template killer.

Re: Move agreement to the language dir?

Reply #5

A question that has concerned me about the language files for a long time: Why are these files in the folder "themes/language" and not somewhere in the "sources"?
▬|████|▬ This is a Nudelholz! Take it und hau it on the Kopp of a bekloppt Person .... to give you a better Gefühl than vorher.

ElkArte 1.1.x & TP on Apache2.4.48, PHP 8.0.8 FPM

Re: Move agreement to the language dir?

Reply #6

Because in theory, themes could add their own strings.
TBH I'm not sure what structure I would like to see in the "far future", so I'm not sure where to move them (well, if I may dream, one day I would like to see all the files related to a certain feature all in one place, but I guess this is easier said than done).
Bugs creator.
Features destroyer.
Template killer.

Re: Move agreement to the language dir?

Reply #7

Quote from: emanuele – Because in theory, themes could add their own strings.
...
As we would say in German: That's a reason, but not an obstacle!  ;)

Quote from: emanuele – ...
TBH I'm not sure what structure I would like to see in the "far future", so I'm not sure where to move them (well, if I may dream, one day I would like to see all the files related to a certain feature all in one place, but I guess this is easier said than done).
Well, I've already seen forks, which in my opinion had a much better structured folder and file layout.  8)
▬|████|▬ This is a Nudelholz! Take it und hau it on the Kopp of a bekloppt Person .... to give you a better Gefühl than vorher.

ElkArte 1.1.x & TP on Apache2.4.48, PHP 8.0.8 FPM

Re: Move agreement to the language dir?

Reply #8

I think also about this ... and I prefer the structure
/Sources
/Themes
/Languages
and in the language folder Subfolder for any language ..
Many are stubborn in relation to the path, a few in relation to the target.
Visit our new Forum Project on https://www.portamx.com

 

Re: Move agreement to the language dir?

Reply #9

I agree. And if there will be a theme with different language files, it should be

../languages/theme_name/language (f.o. english)/file

It should not be:

../themes/theme_name/languages/language (f.o. english)/file

Because no translator will look into a theme folder to translate language files.

So: Yes, the agreement should be part of the language files!  ;)

Re: Move agreement to the language dir?

Reply #10

Quote from: Feline – I think also about this ... and I prefer the structure
/Sources
/Themes
/Languages
and in the language folder Subfolder for any language ..

Yup. Kinda nice if language has its own root folder. Easier to maintain and may be, minimize in the future since there is too much redundancies.

Re: Move agreement to the language dir?

Reply #11

Quote from: Jorin – It should not be
../themes/theme_name/languages/language (f.o. english)/file
It is not, actually is themes\default\languages\english and themes\default\languages\Italian  ... Etc

Anyway it has more sense to be outside the themes folder, but once you know where they are it's not a big deal... Imho
sorry for my bad english

Re: Move agreement to the language dir?

Reply #12

They can be n any theme according to the code, but most themes choose not to add their own files. Fr example, that is why some themes may have ThemeStrings.english.php.
LiveGallery - Simple gallery addon for ElkArte


Re: Move agreement to the language dir?

Reply #14

Quote from: live627 – They can be n any theme according to the code, but most themes choose not to add their own files. Fr example, that is why some themes may have ThemeStrings.english.php.
Didn't know, there is always something new to discover. Thanks for the information. 
sorry for my bad english