From ede45cea8706eb8540e466df9861c2af8ebf9c44 Mon Sep 17 00:00:00 2001 From: RblSb Date: Sun, 4 Jul 2021 03:59:50 +0300 Subject: Reformat --- src/Lang.hx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Lang.hx') diff --git a/src/Lang.hx b/src/Lang.hx index 7b7642d..3bd6963 100644 --- a/src/Lang.hx +++ b/src/Lang.hx @@ -2,24 +2,25 @@ package; import haxe.Json; import haxe.io.Path; + +using Lambda; + #if (sys || nodejs) import sys.io.File; #else import haxe.Http; #end -using Lambda; private typedef LangMap = Map; class Lang { - static final langs:Map = []; static var ids = ["en", "ru"]; #if (js && !nodejs) static var lang = js.Browser.navigator.language.substr(0, 2).toLowerCase(); #end - static function request(path:String, callback:(data:String)->Void):Void { + static function request(path:String, callback:(data:String) -> Void):Void { #if (sys || nodejs) callback(File.getContent(path)); #else @@ -29,7 +30,7 @@ class Lang { #end } - public static function init(folderPath:String, ?callback:()->Void):Void { + public static function init(folderPath:String, ?callback:() -> Void):Void { #if (js && !nodejs) // Filter unused languages ids = ids.filter(id -> id == lang || id == "en"); @@ -64,5 +65,4 @@ class Lang { return text == null ? key : text; } #end - } -- cgit v1.2.3