class Applocale::FilePathUtil
Constants
- DIRNAME_ANDROID
- DIRNAME_IOS
- DIRNAME_JSON
- DIRNAME_MAIN
- EXPORT_FORMAT
- FILENAME_CONFIG
- FILENAME_XLSX
- GOOGLE_CREDENTIALS
- RESOURCE_FOLDER
Public Class Methods
default_config_filename()
click to toggle source
# File lib/applocale/Util/file_util.rb, line 29 def self.default_config_filename return FILENAME_CONFIG end
default_export_format()
click to toggle source
# File lib/applocale/Util/file_util.rb, line 62 def self.default_export_format EXPORT_FORMAT end
default_export_to()
click to toggle source
# File lib/applocale/Util/file_util.rb, line 33 def self.default_export_to return RESOURCE_FOLDER end
default_google_credentials_filename()
click to toggle source
# File lib/applocale/Util/file_util.rb, line 25 def self.default_google_credentials_filename return GOOGLE_CREDENTIALS end
default_localefile_relative_pathstr(platform, lang)
click to toggle source
# File lib/applocale/Util/file_util.rb, line 42 def self.default_localefile_relative_pathstr(platform, lang) if platform == Platform::IOS dirname = DIRNAME_IOS elsif platform == Platform::ANDROID dirname = DIRNAME_ANDROID elsif platform == Platform::JSON dirname = DIRNAME_JSON end unless dirname.nil? filename = Locale.filename(platform, lang) return "#{dirname}/#{filename}" end return nil end
default_mainfolder()
click to toggle source
# File lib/applocale/Util/file_util.rb, line 37 def self.default_mainfolder return DIRNAME_MAIN end
default_xlsx_relativepath_str()
click to toggle source
# File lib/applocale/Util/file_util.rb, line 57 def self.default_xlsx_relativepath_str filename = FILENAME_XLSX return filename end
get_proj_absoluat_path(proj_path)
click to toggle source
# File lib/applocale/Util/file_util.rb, line 17 def self.get_proj_absoluat_path(proj_path) path = proj_path if !(Pathname.new proj_path).absolute? path = File.expand_path(proj_path,Dir.pwd) end return path end