Index: /as3/gunyarapaint/branches/gunyarapaint/compat/assets/langs.xml =================================================================== --- /as3/gunyarapaint/branches/gunyarapaint/compat/assets/langs.xml (リビジョン 3758) +++ /as3/gunyarapaint/branches/gunyarapaint/compat/assets/langs.xml (リビジョン 3758) @@ -0,0 +1,56 @@ + + + + Cannot create a layer more than %s + %s個以上のレイヤーを作成することは出来ません + + + Cannot redo any more + これ以上やり直すことが出来ません + + + %s is not found at %s + コマンド:%sは見つかりません(%s) + + + Layer + レイヤー + + + Background + 背景 + + + The current layer is locked + 現在のレイヤーはロックされています + + + Tried loading invalid signature log + 不正な識別子を持つお絵描きログを読み込もうとしました + + + Cannot undo any more + これ以上巻き戻すことが出来ません + + + Tried loading not supported version's log (%s) + サポートされていないお絵描きログを読み込もうとしました + + + The current layer is invisible + 現在のレイヤーは不可視です + + + Log has been reached to the end + ログファイルが終端に達しました + + + Cannot remove the layer because there is only one layer + ひとつのレイヤーしか無いため、レイヤーを削除することが出来ません + + + Cannot merge layers because there is only one layer or invisible layer is found + ひとつのレイヤーしか無いか、または不可視のレイヤーが見つかったため、レイヤーの統合が出来ません + + + Index: /as3/gunyarapaint/branches/gunyarapaint/compat/src/org/libspark/gunyarapaint/ui/i18n/GetTextTranslator.as =================================================================== --- /as3/gunyarapaint/branches/gunyarapaint/compat/src/org/libspark/gunyarapaint/ui/i18n/GetTextTranslator.as (リビジョン 3758) +++ /as3/gunyarapaint/branches/gunyarapaint/compat/src/org/libspark/gunyarapaint/ui/i18n/GetTextTranslator.as (リビジョン 3758) @@ -0,0 +1,15 @@ +package org.libspark.gunyarapaint.ui.i18n +{ + import com.rails2u.gettext.GetText; + + import org.libspark.gunyarapaint.framework.i18n.ITranslator; + + public final class GetTextTranslator implements ITranslator + { + public function translate(str:String, ...rest):String + { + var translated:String = GetText._(str, rest); + return translated; + } + } +} Index: /as3/gunyarapaint/branches/gunyarapaint/compat/src/org/libspark/gunyarapaint/ui/v1/CopyrightWindow.mxml =================================================================== --- /as3/gunyarapaint/branches/gunyarapaint/compat/src/org/libspark/gunyarapaint/ui/v1/CopyrightWindow.mxml (リビジョン 3721) +++ /as3/gunyarapaint/branches/gunyarapaint/compat/src/org/libspark/gunyarapaint/ui/v1/CopyrightWindow.mxml (リビジョン 3758) @@ -1,4 +1,4 @@ - @@ -13,16 +13,19 @@ ]]> - + http://www.libspark.org/svn/as3/gunyarapaint/) - + This application uses the part of as3corelib (http://code.google.com/p/as3corelib/) This application uses SWFMouseWheel -(http://code.google.com/p/swfmousewheel/)]]> +(http://code.google.com/p/swfmousewheel/) + +This application uses as3gettext +(http://coderepos.org/share/browser/lang/ruby/as3gettext/trunk/)]]> Index: /as3/gunyarapaint/branches/gunyarapaint/compat/src/com/rails2u/gettext/GetText.as =================================================================== --- /as3/gunyarapaint/branches/gunyarapaint/compat/src/com/rails2u/gettext/GetText.as (リビジョン 3758) +++ /as3/gunyarapaint/branches/gunyarapaint/compat/src/com/rails2u/gettext/GetText.as (リビジョン 3758) @@ -0,0 +1,46 @@ +package com.rails2u.gettext { + import flash.system.Capabilities; + + public class GetText { + public static var locale:String = Capabilities.language; + public static var defaultLocale:String = 'en'; + + public static function _(str:String, args:Array = null):String { + var res:String; + if (cacheLangStrings[locale] && cacheLangStrings[locale][str]) { + res = cacheLangStrings[locale][str]; + } else if (cacheLangStrings[defaultLocale] && cacheLangStrings[defaultLocale][str]) { + res = cacheLangStrings[defaultLocale][str]; + } else { + res = str; + } + if (args) res = sprintf(res, args); + return res; + } + + public static function sprintf(str:String, args:Array = null):String { + args = args.slice(); + return str.replace(/%s/g, function():String { + return args.shift(); + }); + } + + private static var cacheLangStrings:Object = {}; + public static function initLangFile(xml:XML):void { + var origIgnoreWhiteSpace:Boolean = XML.ignoreWhitespace; + XML.ignoreWhitespace = false; + try { + for each (var lang:XML in xml.lang) { + var langname:String = lang.@lang.toString(); + var res:Object = {}; + for each (var message:XML in lang.message) { + res[message.msgid.toString()] = message.msgstr.toString(); + } + cacheLangStrings[langname] = res; + } + } finally { + XML.ignoreWhitespace = origIgnoreWhiteSpace; + } + } + } +} Index: /as3/gunyarapaint/branches/gunyarapaint/compat/src/gunyarapaint.mxml =================================================================== --- /as3/gunyarapaint/branches/gunyarapaint/compat/src/gunyarapaint.mxml (リビジョン 3744) +++ /as3/gunyarapaint/branches/gunyarapaint/compat/src/gunyarapaint.mxml (リビジョン 3758) @@ -4,4 +4,5 @@ xmlns:ui="org.libspark.gunyarapaint.ui.v1.*" layout="absolute" width="100%" height="100%" + preinitialize="onPreinitialize(event)" applicationComplete="onApplicationComplete(event)" removedFromStage="onRemove(event)" @@ -13,4 +14,5 @@