Sha256: 18d2454bca99cb7b8fec86d568b6a1522dd1067cd01ac6ffb62e127e1567b66e

Contents?: true

Size: 834 Bytes

Versions: 32

Compression:

Stored size: 834 Bytes

Contents

#
# tDiary language setup: Japanese(ja)
#
# Copyright (C) 2001-2011, TADA Tadashi <t@tdtds.jp>
# You can redistribute it and/or modify it under GPL2. or any later version
#

def html_lang
	'ja-JP'
end

def encoding
	'UTF-8'
end

def encoding_old
	'EUC-JP'
end

def mobile_encoding
	'Shift_JIS'
end

def to_mobile( str )
	str.encode(mobile_encoding, {invalid: :replace, undef: :replace})
end

def to_mail( str )
	str.encode('iso-2022-jp', {invalid: :replace, undef: :replace})
end

def migrate_to_utf8( str )
	to_native( str, encoding_old )
end

def shorten( str, len = 120 )
	matched = str.gsub( /\n/, ' ' ).scan( /^.{0,#{len - 2}}/u )[0]
	if $'.nil? || $'.empty?
		matched
	else
		matched + '..'
	end
end

def comment_length
	60
end

# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:

Version data entries

32 entries across 22 versions & 1 rubygems

Version Path
tdiary-5.1.7 lib/tdiary/lang/ja.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/lib/tdiary/lang/ja.rb
tdiary-5.1.6 lib/tdiary/lang/ja.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/lib/tdiary/lang/ja.rb
tdiary-5.1.5 lib/tdiary/lang/ja.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/lib/tdiary/lang/ja.rb
tdiary-5.1.4 lib/tdiary/lang/ja.rb
tdiary-5.1.3 lib/tdiary/lang/ja.rb
tdiary-5.1.2 lib/tdiary/lang/ja.rb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/lib/tdiary/lang/ja.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/lib/tdiary/lang/ja.rb
tdiary-5.1.1 lib/tdiary/lang/ja.rb
tdiary-5.1.0 lib/tdiary/lang/ja.rb
tdiary-5.0.14 lib/tdiary/lang/ja.rb
tdiary-5.0.13 lib/tdiary/lang/ja.rb
tdiary-5.0.12.1 lib/tdiary/lang/ja.rb
tdiary-5.0.11 lib/tdiary/lang/ja.rb
tdiary-5.0.10 lib/tdiary/lang/ja.rb
tdiary-5.0.9 lib/tdiary/lang/ja.rb
tdiary-5.0.8 lib/tdiary/lang/ja.rb