Jump to content

[LF] Translators for GTW-RPG v4.0 [PAID]


Recommended Posts

About the project

GTW-RPG is one of the oldest open source RPG game modes for MTA, initially launched in year 2012 and currently at version 3.0. Right now we're building v4.0 which provides a lot of new features, including a project wide system for language translations. Now this job is easy script wise but requires a high amount of time to make sure everything is correct which is why we've decided to spend 0.1 BTC (~$115) to finally fix the translations. 

About the job

The job includes, not only the actual translations but most important the conversation from the current system in where all text is hard coded into the files to a table with a strict structure holding ID's and corresponding text in multiple languages (organized by language) which is then dynamically collected from the files itself. GTW-RPG has 45 resources in the affected folder and on average 40 static strings in each resource that needs to be converted. Due to the open source nature of the project we'll pay per resource (even at string level) so that multiple users can contribute and still get their fair share of the money listed above.

How to participate

Simply fork the GTW-RPG v4.0 development branch, implement the new language system (or add translations to already existing implementations) then do a push to the project, if approved (yes there are some conditions, see below for more details) we'll ask for a BTC address via Github to where we can send your payment within 48 hours.

How o implement the new language system:

This is a detailed description of the job, step by step:

  • Add the file lang.lua to the resource if it's not there, it should have the same structure as this example: 
Spoiler

--[[
********************************************************************************
	Project owner:		RageQuit community
	Project name: 		GTW-RPG
	Developers:   		<YOUR_NAME_HERE>

	Source code:		https://github.com/GTWCode/GTW-RPG
	Bugtracker: 		https://discuss.404rq.com/t/issues
	Suggestions:		https://discuss.404rq.com/t/suggestions
	Donations:			1HNoLvQJxkH7YtRcUynwUeqfBJp3uSLXMf

	Version:    		Open source
	License:    		BSD 2-Clause
	Status:     		Stable release
********************************************************************************
]]--

-- Definition of default language for this resource
r_lang = exports.GTWcore:getLanguage() or "en_US"

-- Language text storage for this resource
lang_txt = {
	-- English/English
	["en_US"] = {
		["msg_rental_shop"] 	= "This is a rental shop from where you can get a car",
		["msg_fuel"] 		= "All vehicles need fuel, you can buy fuel at any gas station",
		["msg_skin_shop"] 	= "This is a skin shop, walk inside to buy a new skin",
		["msg_gym"] 		= "Visit the gym to improve your stamina or muscles",
		["msg_health"] 		= "You can regain your health by eating, literally anything",
		["msg_gang"] 		= "Create/join a gang by pressing F6 to open your gang/goup/clan panel",
		["msg_gang2"] 		= "When you're in a gang you can capture turfs to gain money and respect",
		["msg_work"] 		= "This is a work place, you can get a job here to make money",
		["msg_initialize"]	= "Initializing...",
	},

	-- Swedish/Svenska
	["sv_SE"] = {
		["msg_rental_shop"] 	= "Här kan du hyra en bil för en fast timkostnad",
		["msg_fuel"] 		= "Alla fordon behöver bränsle, här kan du tanka bilen",
		["msg_skin_shop"] 	= "Detta är en skinshop, här kan du ändra utseende",
		["msg_gym"] 		= "Besök gymmet om du vill bygga muskler eller förbättra konditionen",
		["msg_health"] 		= "Du kan höja din hälsa genom att äta",
		["msg_gang"] 		= "Klicka på F6 för att öppna panelen där du kan skapa grupper och gäng",
		["msg_gang2"] 		= "Ta över och kontrollera områden för att tjäna pengar som gängmedlem",
		["msg_work"] 		= "Detta är ett arbete, här kan du söka jobb och tjäna pengar på hederligt vis",
		["msg_initialize"]	= "Initialiserar intro...",
	},
}

 

  • Add an entry for lang.lua in meta.xml right below the info line, like this:
    <info author="GTWGames" version="98" name="GTWaccounts" decription="Account system with GTW GUI" type="script" />
    
    <!-- Language support: must be located at the top -->
    <script src="lang.lua" type="shared" />
  • Localize all static string outputs in each file of the resource you're dealing with, GUI elements(), outputChatBox(), exports.GTWtopbar:dm() etc and replace them with this line:
lang_txt[getElementData(source, "GTWcore.language") or r_lang]["msg_CHANGE_THIS_TO_IDENTIFIER"]

* GTWcore.language holds a language value like: en_US in standard ISO format, this is used to identify the language in the file lang.lua. r_lang holds the default server language set in GTWcore and last but not least, the value msg_CHANGE_THIS_TO_IDENTIFIER must be an identifier for the string to load at the specific position in the code, change this to a non conflicting relevant value and make sure it's the same for all languages, i.e:

-- Language text storage for this resource
lang_txt = {
    -- English/Simplified English
    ["en_US"] = {
		["msg_welcome"] 	= "This is a welcome message in English",
    },

    -- English/English
    ["en_UK"] = {
		["msg_welcome"] 	= "This is a welcome message in Brittish English",
    },
}
  • Test with /debugscript 3 and look for error in server log. Any syntax errors or issues with the structure will lead to a rejection of your pull request. Please note that we do accept not fully accurate translations, minor spelling errors etc but issues with the code structure or introduced errors is strictly forbidden.

The job is available from this exact moment and forth as long there is money left, I'll keep this topic updated after each approved contribution. Payouts are made with Bitcoins only and will be listed here for maximum transparency and lowest possible fees.

Requirements

  • Your work will be open source and a part of the GTW-RPG project on Github
  • Your push must be to the v4.0-development branch
  • The code structure must be strictly according to specification, tested and working, see GTWantispam for an example of a finished conversation
  • The job must be 100% finished for a resource in order for a push to be approved, and for you to be paid
  • A finished conversation of a resource with static strings must contain all current English translations
  • You should have decent knowledge in Lua and Github and have a working BTC wallet
  • The commit message should be: misc: language update for NAME_OF_RESOURCE
  • The commit must not contain anything outside of specification

If you're interested, start a topic in the issues page: https://github.com/404rq/GTW-RPG/issues and let me know which resources you plan to work on so that we don't get any duplicates.

Edited by Mr_Moose
Syntax error in example
Link to comment
  • HAZJ featured this topic
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...