Loading...
 

LanguageCzech



Using JEdit and regexps for translation

You can use JEdit and its Search and Replace feature to make the process of translation much easier and faster. Amongst the common text match and replace you can search strings using more powerful regular expressions and replace the matches with a so called BeanShell snippet. I'm using for example this setting in the Search and Replace dialog (Ctrl+F):

Example 1

Search for:

Copy to clipboard
this ([^\" ]*)",

Replace with: Return value of a BeanShell snippet

Copy to clipboard
" tuto (tento/toto) "+_1+"\","

Search in: Current buffer
Settings: Keep dialog, Regular expressions
Direction: Auto wrap

Then I do prefer to control visually what's happening by clicking "Find" button first and then "Replace & Find" until all matches are replaced or you can click "Replace All" when you're sure what you're doing wink.

This example will match all untranslated strings on lines such as:
// "monitor this map" => "monitor this map",
// "stop monitoring this map" => "stop monitoring this map",
// "Edit this genre:" => "Edit this genre:",

and replace them with:
// "monitor this map" => "monitor tuto (tento/toto) map",
// "stop monitoring this map" => "stop monitoring tuto (tento/toto) map",
// "Edit this genre:" => "Edit tuto (tento/toto) genre:",

Another example:

Search for:

Copy to clipboard
"admin ([^\"]*) tpl",

Replace with:

Copy to clipboard
"\"nastav tpl pro "+_1+"\","


This example will do e.g. the next:
// "admin cache tpl" => "nastav tpl pro cache",
// "admin Banners tpl" => "nastav tpl pro Banners",
// "admin live support tpl" => "nastav tpl pro live support",
etc.



Page last modified on Wednesday 15 June 2011 06:13:22 GMT-0000

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting