Wedge

Public area => The Pub => Plugins => Topic started by: amar on November 21st, 2013, 09:17 PM

Title: Lang. files?
Post by: amar on November 21st, 2013, 09:17 PM
Where can I find lang. files? I want to translate it.
Title: Re: Lang. files?
Post by: kimikelku on November 21st, 2013, 09:51 PM
I guess you'll need to wait until there is a beta version for the public to start translating, since alot of things can change while nao is working on the project.
Title: Re: Lang. files?
Post by: amar on November 21st, 2013, 10:50 PM
Quote from kimikelku on November 21st, 2013, 09:51 PM
I guess you'll need to wait until there is a beta version for the public to start translating, since alot of things can change while nao is working on the project.
Ok, thanks for the answer. :cool:
Title: Re: Lang. files?
Post by: Nao on December 4th, 2013, 12:22 AM
If you're comfortable with using Git, I'm planning to release the language files to a special repo over there, and allow you guys to submit pull requests.
Title: Re: Lang. files?
Post by: kimikelku on December 27th, 2013, 06:39 PM
@Nao have you setup the Git for the language files? I would like to translate Wedge to portuguese.
Title: Re: Lang. files?
Post by: Nao on December 27th, 2013, 11:58 PM
This is the desired format for French language files (for instance):
FORUM_ROOT/languages/index.french.php

This is the desired format in a tentative repo:
REPO_ROOT/French/index.french.php

I can easily have plugins in a separate repo because I'm using the repo as my Plugins folder in my local Wedge install, and I don't have to copy files. But I can't maintain a language repo the same way, because a 'professional' repo would need to separate all languages clearly, when the Wedge repo will require languages to be all in the same folder -- mostly because it's then easier to update by FTP.

Any solutions, maybe..?
Title: Re: Lang. files?
Post by: Nao on December 29th, 2013, 08:42 PM
Bump for ideas on how to 'solve' this problem with the folder structure...
Title: Re: Lang. files?
Post by: forumsearch0r on December 29th, 2013, 09:10 PM
You might also want to consider that languages like German have a formal and an informal "sublanguage", so just taking the name of the language might narrow it too much.
Title: Re: Lang. files?
Post by: Nao on December 29th, 2013, 10:34 PM
Well, British language files in Wedge are called 'index.english-uk.php', so that would be a 'English-UK' folder, so an 'English' folder still makes sense, of course.
Title: Re: Lang. files?
Post by: forumsearch0r on December 29th, 2013, 11:49 PM
Depends which English is "the" English.
Title: Re: Lang. files?
Post by: Nao on December 30th, 2013, 02:54 PM
I've already discussed it. The main language, to me, is the most commonly 'written' one, on the Internet. US English is spoken by more people than British/UK English (even if you count Irish, Canadian, New Zealandish (?) and Australian variations into it, and whatever else might exist), so it gets to be the 'default' choice for me. If there were more French-Canadians speaking French, the default French language version would have tabernacles and crisses de calisse all over it. Well, I don't know why I'd have to use expletives in the translations, but whatever. :P
Title: Re: Lang. files?
Post by: Nao on January 2nd, 2014, 01:18 AM
Still bumping for ideas on how to deal with the languages repo.

Possible solutions:
1- Just have everything in a single folder. Very, very messy, but whatever.
2- Keep English and French in the root, and have other versions in sub-folders. Meaning I'd probably drop support for other languages on wedge.org if I can't bother to update these folders here.
3- Have all languages in different subfolders, and expect me to systematically update my root languages folder with the files, everytime I apply a change. Don't count too much on that.....
4- Use some sort of symlink system that would allow me to use a separate repo with one folder per language, but have all of these folders' files (or at least most of the current ones) show up in my local Wedge repo's language folder. This is what I've been looking into, but I just have one problem: I have no idea how to do that. I'm aware that NTFS allows for 'proper' symlinks, i.e. hardlinks à la Linux, not silly 'shortcuts' à la Windows 95, I even have a program that moves games around on my hard drives and still lets them run without reinstalling (thanks to hardlinking), but I don't know how I'd do that with Wedge, plain and simple.

So... Again, opinions welcome! I'd like to do the languages repo next, really. That's REALLY the very first repo I'll be expecting contributions to, and I can't wait for that. (At the current point, it's unlikely that the language files are going to change a lot. Manipulating them was Pete's habit, but personally I prefer to avoid playing with them if I don't have to.)
Title: Re: Lang. files?
Post by: Norodo on January 2nd, 2014, 10:30 AM
Stick it all in the database.

;)
Title: Re: Lang. files?
Post by: Nao on January 2nd, 2014, 04:30 PM
Well, Pete did that for BBCode, and we know how it ended... No UI to modify the codes, and if I happen to consider changing the default code for a tag, I'll have to ditch my table and refill it.

Also, it doesn't help with uploading modified files by FTP... :^^;:
Unless maybe Wedge started doing something revolutionary, like updating any and all of its files through the github repo... In which case, well, I guess for one it totally rocks your house, and for two it's a recipe for disaster... :P

(Although, I'll point out that it worked quite well with Aeva Media, but it was only with the site list, NOT with the mod's files!)
Title: Re: Lang. files?
Post by: Nao on January 13th, 2014, 12:23 AM
So, here's the current structure...

In the Wedge repo:
(root)
  /core
    /languages
      - all English files
      - all French files (<-- might possibly go.)

In the languages repo:
(root)
  - all English files
  - all French files
  /english-uk
    - all English UK files
  /german
    - all German files

Basically, whenever I make a change to an English file, I'd commit it to both the Wedge repo and languages repo, so that a Wedge package can easily be made out of the repo.
This causes the issue that, technically, it's a waste of repo space to duplicate these files. I was thinking of going for a submodule system for language folders, but I think there are issues with keeping both repos in sync, and whether Github can include the external repo in any automatically generated zip files..?

Anyone got experience with this..?
Title: Re: Lang. files?
Post by: Norodo on January 13th, 2014, 11:49 AM
I have no experience with that, but I know I'm going to get started on a Norwegian translation as soon as possible. Is there a thread for coordinating language efforts?
Title: Re: Lang. files?
Post by: Nao on January 13th, 2014, 01:00 PM
Not for now; but there's the last blog post where you can start a reply or something, then if needed, I'll move it to a new topic, and then eventually (if Wedge gets any success), to its own board.
Title: Re: Lang. files?
Post by: Nao on January 13th, 2014, 01:08 PM
Re: my question, I decided that French didn't really justify being included in the main repo. I mean, who here speaks French, apart from me..??!
I'm not going to bother everyone with my stuff.
I'm still leaving French at the root of the languages repo, but it will no longer be in the Wedge repo.

So, basically, I have a /core/languages/ folder, which contains only the *.english.php files in the Wedge repo, but on my local repo, it also contains French files, because my /core/languages folder is also a copy of my languages repo. See what I mean..? It just means that everytime I'll make a change to the English files, I'll have it in a 'committable' state for both the Wedge and languages repos. So, from now on, English changes will be exactly duplicated between Wedge and languages repos, taking a bit more space, but making it easier to quickly generate a 'working' zip of Wedge.
Title: Re: Lang. files?
Post by: wedge.helmer.co on January 13th, 2014, 08:27 PM
I think you should have at the languages in the same folder. It makes things in the long run a hell of a lot easier. Think about it for a minute, you have a new translation, you ftp it to the Languages folder and it instantly becomes available for use by Wedge just like English, English-UK and French.  Also for any mods, all language files are in the one directory were authors do not have to add or remember directory names for each language.

Plus you would have to predefine in advance each language directory name and add code to link the directory. Also the language tree consists of one directory instead of many which is less messy.

Just my thoughts.


John
Title: Re: Lang. files?
Post by: Farjo on January 13th, 2014, 08:51 PM
Why does english need to be in the language repo if is is in the main repo? Nobody will download the english files because they already have them.
Title: Re: Lang. files?
Post by: Nao on January 14th, 2014, 12:22 AM
@Farjo, because then translators only need to check the languages repo for any changes, they don't have to subscribe to notifications for the Wedge repo just to do their (unpaid!) job.
Quote from ftab4me on January 13th, 2014, 08:27 PM
I think you should have at the languages in the same folder. It makes things in the long run a hell of a lot easier.
Again-- languages can still be put into the same folder. (In fact, right now, it's the only way to add a language -- you FTP the files to the languages root folder.)
There are separate folders in the languages repo to make it easier to handle language files for both translators and users. They download the language repo, then they extract the language files from the folder they want, into their languages folder's root.
I'm only putting the French language files at the root alongside English files because I'm the author, and I don't want the hassle of entering two folders to update my site by FTP, instead of just one.
Quote from ftab4me on January 13th, 2014, 08:27 PM
Think about it for a minute, you have a new translation, you ftp it to the Languages folder and it instantly becomes available for use by Wedge just like English, English-UK and French.  Also for any mods, all language files are in the one directory were authors do not have to add or remember directory names for each language.
Plugin language files are expected to remain in the plugin's personal folder. There's a language call (loadPluginLanguage) that replaces loadLanguage, and takes the plugin's ID into account to find the location of the language files. This is as designed by Arantor; I don't see any reason to change that. (Not taking into account the fact that I'm left the only maintainer of the plugin system now, and I've never actually used it, so that'll be a lot of fun[1]. The other two people who were making plugins for Wedge left this place some time ago, possibly because of real-life duties, or simply because they chose to go back to SMF too, I don't know, I'm no longer at SMF.)
 1. Which is why I'm in early plans of restoring some kind of SMF mod functionality in that you'll be able to modify source files like a regular mod, BUT it won't break your website if done incorrectly. I'll talk about that later.