This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Delutto's profile picture

Localization Files

Started by Delutto, 12 April 2013 - 01:31 PM
Delutto #1
Posted 12 April 2013 - 03:31 PM
Hi!
I'm from Brazil and I'm part a group of game translators. We intend to translate ComputerCraft MOD into Portuguese.
Would it be possible to update the MOD for read the strings from a .properties file in a Lang folder, like in other modifications as BuilCraft, Forestry, etc.?
We would also like to translate wikia.
Regardless of the answer, thank you for this awesome MOD! ;)/>
Dlcruz129 #2
Posted 12 April 2013 - 04:06 PM
Hi!
I'm from Brazil and I'm part a group of game translators. We intend to translate ComputerCraft MOD into Portuguese.
Would it be possible to update the MOD for read the strings from a .properties file in a Lang folder, like in other modifications as BuilCraft, Forestry, etc.?
We would also like to translate wikia.
Regardless of the answer, thank you for this awesome MOD! ;)/>/>

Unfortunately, ComputerCraft is closed source, and therefore it is illegal to modify its base files.
Delutto #3
Posted 12 April 2013 - 04:59 PM
Hi!
I'm from Brazil and I'm part a group of game translators. We intend to translate ComputerCraft MOD into Portuguese.
Would it be possible to update the MOD for read the strings from a .properties file in a Lang folder, like in other modifications as BuilCraft, Forestry, etc.?
We would also like to translate wikia.
Regardless of the answer, thank you for this awesome MOD! ;)/>/>

Unfortunately, ComputerCraft is closed source, and therefore it is illegal to modify its base files.
I know that.
My suggestion is to implement a directory for localizations, thereby the developer could add the localization made ​​by translators in a future update. I'm sure there would be many other users from other countries disposed to locate the MOD for their languages​​, popularizing ComputerCraft even more.
PixelToast #4
Posted 12 April 2013 - 05:30 PM
the only thing you can translate is the actual text displayed by lua files, you will have to modify base classes to change item names and such (really easy with a bytecode editor)
poke around in the /lua/ folder in the mod to change the text you see in the computers themselves
Dlcruz129 #5
Posted 12 April 2013 - 05:30 PM
Hi!
I'm from Brazil and I'm part a group of game translators. We intend to translate ComputerCraft MOD into Portuguese.
Would it be possible to update the MOD for read the strings from a .properties file in a Lang folder, like in other modifications as BuilCraft, Forestry, etc.?
We would also like to translate wikia.
Regardless of the answer, thank you for this awesome MOD! ;)/>/>/>

Unfortunately, ComputerCraft is closed source, and therefore it is illegal to modify its base files.
I know that.
My suggestion is to implement a directory for localizations, thereby the developer could add the localization made ​​by translators in a future update. I'm sure there would be many other users from other countries disposed to locate the MOD for their languages​​, popularizing ComputerCraft even more.

Ah, sorry, didn't read the full post. I think it's a good idea.
Sammich Lord #6
Posted 12 April 2013 - 05:32 PM
Ah, sorry, didn't read the full post. I think it's a good idea.
What is the point of responding if you didn't read the whole post?
theoriginalbit #7
Posted 12 April 2013 - 05:36 PM
What is the point of responding if you didn't read the whole post?
coz thats what Dlcruz does all the time
Dlcruz129 #8
Posted 12 April 2013 - 05:54 PM
Ah, sorry, didn't read the full post. I think it's a good idea.
What is the point of responding if you didn't read the whole post?

To apologize and show my support for the suggestion?

What is the point of responding if you didn't read the whole post?
coz thats what Dlcruz does all the time

Shaddup. :P/>
superaxander #9
Posted 12 April 2013 - 07:20 PM
Really good idea I could translate to Dutch and maybe French a bit
Cloudy #10
Posted 12 April 2013 - 07:43 PM
Personally I don't see the point. The only thing that could be translated nicely would be GUI strings, and we don't have many of them. I don't think it is worth the effort.
Delutto #11
Posted 12 April 2013 - 07:59 PM
Personally I don't see the point. The only thing that could be translated nicely would be GUI strings, and we don't have many of them. I don't think it is worth the effort.
If there are few, even better, less work. :D/>
Translate the help and the name of the peripherals would be of great help to the autodidacts in Computercraft.

In brazilian Minecraft forums, there are many threads of people want for help in ComputerCraft, sometimes even having a good knowledge of computers, the user has no knowledge in english, which complicates/slows progress of learning.
Please reconsider the request, if you provide the localization files with texts in english, will send it translated into portuguese. The same for other languages​​, so you will need a mod multilanguage
superaxander #12
Posted 12 April 2013 - 11:41 PM
Personally I don't see the point. The only thing that could be translated nicely would be GUI strings, and we don't have many of them. I don't think it is worth the effort.
If there are few, even better, less work. :D/>/>
Translate the help and the name of the peripherals would be of great help to the autodidacts in Computercraft.

In brazilian Minecraft forums, there are many threads of people want for help in ComputerCraft, sometimes even having a good knowledge of computers, the user has no knowledge in english, which complicates/slows progress of learning.
Please reconsider the request, if you provide the localization files with texts in english, will send it translated into portuguese. The same for other languages​​, so you will need a mod multilanguage
That would break some programs
Xfel #13
Posted 13 April 2013 - 12:22 AM
The help can be translated already. Just translate the files and place them in .minecraft/mods/ComputerCraft/lua/rom/help. You have to maintain the file names, though

But everything that is directly related to code should always stay the same. Imagine a program tries to find the modem, but it cannot as the modem's getType doesn't return "modem", but something else.

and offtopic, why do you always write in bold?
Dlcruz129 #14
Posted 13 April 2013 - 04:47 AM
All of the help files and shell can be modified already, however the tooltips aren't able to be edited.
Cranium #15
Posted 13 April 2013 - 05:14 AM
I do see how it would be nice to have language support for all languages. I like the idea.
MudkipTheEpic #16
Posted 13 April 2013 - 09:22 AM
Well, it's hard to have more languages if don't have characters like ç and such…
FuuuAInfiniteLoop(F.A.I.L) #17
Posted 13 April 2013 - 10:14 AM
Hi!
I'm from Brazil and I'm part a group of game translators. We intend to translate ComputerCraft MOD into Portuguese.
Would it be possible to update the MOD for read the strings from a .properties file in a Lang folder, like in other modifications as BuilCraft, Forestry, etc.?
We would also like to translate wikia.
Regardless of the answer, thank you for this awesome MOD! ;)/>/>

Unfortunately, ComputerCraft is closed source, and therefore it is illegal to modify its base files.
I know that.
My suggestion is to implement a directory for localizations, thereby the developer could add the localization made ​​by translators in a future update. I'm sure there would be many other users from other countries disposed to locate the MOD for their languages​​, popularizing ComputerCraft even more.
I will like to translate it to spanish, its fastest to understand by one milisecond!!!(sarcasm on, except for the part of tranlating it, it will be fun!)

I translated DNACraft in his origins(3 weeks before the first prerelease)
Delutto #18
Posted 14 April 2013 - 12:50 PM
and offtopic, why do you always write in bold?
Why not?
PixelToast #19
Posted 14 April 2013 - 06:42 PM
and offtopic, why do you always write in bold?
Why not?
because its a waste of 29 bytes of bandwidth
jk
diegodan1893 #20
Posted 15 April 2013 - 10:13 AM
I like the idea, but it isn't posible at the moment because you can't write ñ, ç or any other special character in a computer.
Spongy141 #21
Posted 17 April 2013 - 05:38 PM
I don't see a point in translating the language, since most programming languages are in English, why translate them, if you want to program, and you don't know English, that sucks for you, but you still need to learn at least the basics to program.
Dlcruz129 #22
Posted 17 April 2013 - 07:03 PM
I don't see a point in translating the language, since most programming languages are in English, why translate them, if you want to program, and you don't know English, that sucks for you, but you still need to learn at least the basics to program.

Good point.
ElvishJerricco #23
Posted 12 October 2013 - 05:00 PM
Necromancing to add to the idea.

Rather than a localization directory, how about a localization API? One that's initialized Java-side to include strings needed for CraftOS that come from a resource location with language files (so that resource packs can add new translations). Plus you could do what BuildCraft does and have a Github repo specifically for language files so that anyone can add translations and submit a pull request.

Then, with the API, any program can add localizations with their own keys and strings and use them in their programs.


lang.addString("en_US", "programName.keyForString", "This is my string") -- using dot notation for specificitys sake, no technical reason
lang.addString("fr_FR", "programName.keyForString", "C'est ma chaine")) -- cant exactly get the proper unicode in CC, but you can come close

print(lang.getString("programName.keyForString") -- returns the string for key from current language
immibis #24
Posted 12 October 2013 - 08:08 PM
Necromancing to add to the idea.

Rather than a localization directory, how about a localization API? One that's initialized Java-side to include strings needed for CraftOS that come from a resource location with language files (so that resource packs can add new translations). Plus you could do what BuildCraft does and have a Github repo specifically for language files so that anyone can add translations and submit a pull request.

Then, with the API, any program can add localizations with their own keys and strings and use them in their programs.


lang.addString("en_US", "programName.keyForString", "This is my string") -- using dot notation for specificitys sake, no technical reason
lang.addString("fr_FR", "programName.keyForString", "C'est ma chaine")) -- cant exactly get the proper unicode in CC, but you can come close

print(lang.getString("programName.keyForString") -- returns the string for key from current language

Done:

local data = {en_US={}}
local curlang = "en_US"
lang = {}
function lang.getString(name)
  return data[curlang][name] or data.en_US[name] or name
end
function lang.addString(language, name, str)
  data[language] = data[language] or {}
  data[language][name] = str
end
function lang.setLanguage(language)
  data[language] = data[language] or {}
  curlang = language
end
ElvishJerricco #25
Posted 12 October 2013 - 09:06 PM
Done:

local data = {en_US={}}
local curlang = "en_US"
lang = {}
function lang.getString(name)
  return data[curlang][name] or data.en_US[name] or name
end
function lang.addString(language, name, str)
  data[language] = data[language] or {}
  data[language][name] = str
end
function lang.setLanguage(language)
  data[language] = data[language] or {}
  curlang = language
end

Yea I wrote something and posted in the APIs section. Wasn't hard, and mine supports lang files in a given path. But that doesn't mean it wouldn't be really nice to have.