-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from litan/master
Pull in the Turkish Level 2 wiring by Lalit
- Loading branch information
Showing
8 changed files
with
360 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Kojo can be localized at three levels. | ||
|
||
* Level 1 - localization of the UI | ||
* Level 2 - localization of the basic turtle and looping commands (so that children can program in the target language). | ||
* Level 3 - localization of the existing turtle graphics samples. | ||
|
||
The following are the steps that need to be followed to do the localization: | ||
|
||
The first step is to fork and then clone the kojo repo. You can then make the required localization enhancements in your repo and send pull requests. | ||
|
||
In the discussion below, let's assume that the language code for the target language is `xx`. | ||
|
||
### Level 1 | ||
Create `Bundle_xx.properties` by tanslating the following file: | ||
https://github.com/litan/kojo/blob/master/src/main/resources/net/kogics/kojo/lite/Bundle.properties | ||
|
||
Add your language code to the list here: | ||
https://github.com/litan/kojo/blob/master/src/main/scala/net/kogics/kojo/lite/LangMenuFactory.scala#L31 | ||
|
||
Add your language (localized) name to the map here: | ||
https://github.com/litan/kojo/blob/master/src/main/scala/net/kogics/kojo/lite/LangMenuFactory.scala#L75 | ||
|
||
Then send a pull request. | ||
|
||
### Level 2 | ||
Create `level2_xx.properties` by translating the following file: | ||
https://github.com/litan/kojo/blob/master/l10n-level2/level2.properties | ||
|
||
Then send a pull request. | ||
|
||
FYI, with the help of `level2_xx.properties`, the following files will be modified by a Kojo core-developer to wire in the level-2 changes: | ||
* xxInit.scala (generated from the above properties file). | ||
* xx.tw.scala | ||
* LangInit.scala | ||
|
||
Here's an example checkin for a wiring-in: | ||
https://github.com/litan/kojo/commit/852c18a6124fe773063f846db8fda9b7b705ab4c | ||
|
||
### Level 3 | ||
This is best explained with an example: | ||
|
||
if you want to localize the following sample for Swedish: | ||
`src/main/resources/samples/spiral.kojo` | ||
Then you just need to just create the following localized version of the sample: | ||
`src/main/resources/samples/sv/spiral.kojo` | ||
The version of spiral.kojo under the sv directory will get picked up when Kojo is running in Swedish mode. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (C) 2013 | ||
* Bjorn Regnell <[email protected]>, | ||
* Lalit Pant <[email protected]> | ||
* | ||
* The contents of this file are subject to the GNU General Public License | ||
* Version 3 (the "License"); you may not use this file | ||
* except in compliance with the License. You may obtain a copy of | ||
* the License at http://www.gnu.org/copyleft/gpl.html | ||
* | ||
* Software distributed under the License is distributed on an "AS | ||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | ||
* implied. See the License for the specific language governing | ||
* rights and limitations under the License. | ||
* | ||
*/ | ||
|
||
// Turkish Turtle wrapper init for Kojo | ||
|
||
// make Turkish names visible | ||
val TurkishAPI = net.kogics.kojo.lite.i18n.TurkishAPI | ||
import TurkishAPI._ | ||
// hide turtle.clear | ||
import kaplumbağa.{sil => _, _} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.