Sha256: 7e14a505768f477cecf612f8200a994a1147d0352c88177a4d73b9b35d219122

Contents?: true

Size: 1.23 KB

Versions: 32

Compression:

Stored size: 1.23 KB

Contents

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

#
# 'html_lang' method returns String of HTML language attribute.
#
def html_lang
	'en-US'
end

#
# 'encoding' method returns String of HTTP or HTML charactor encoding.
#
def encoding
	'UTF-8'
end

def encoding_old
	'UTF-8'
end

#
# 'mobile_encoding' method returns charactor encoding in mobile mode.
#
def mobile_encoding
	'UTF-8'
end

#
# 'migrate_to_utf8' method converts string to UTF-8, but dummy in en.
#
def migrate_to_utf8( str )
	str.dup
end

#
# 'to_mobile' method converts string automatically to mobile mode encoding.
#
def to_mobile( str )
	str.dup
end

#
# 'to_mail' method converts string automatically to E-mail encoding.
#
def to_mail( str )
	str.dup
end

#
# 'shorten' method cuts string length.
#
def shorten( str, length = 120 )
	matched = str.gsub( /\n/, ' ' ).scan( /^.{0,#{length - 2}}/u )[0]
	unless $'.empty?
		matched + '..'
	else
		matched
	end
end

#
# 'comment_length' returns length of shorten comment on recent or monthly view.
#
def comment_length
	120
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/en.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/en.rb
tdiary-5.1.6 lib/tdiary/lang/en.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/lib/tdiary/lang/en.rb
tdiary-5.1.5 lib/tdiary/lang/en.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/lib/tdiary/lang/en.rb
tdiary-5.1.4 lib/tdiary/lang/en.rb
tdiary-5.1.3 lib/tdiary/lang/en.rb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/lib/tdiary/lang/en.rb
tdiary-5.1.2 lib/tdiary/lang/en.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/lib/tdiary/lang/en.rb
tdiary-5.1.1 lib/tdiary/lang/en.rb
tdiary-5.1.0 lib/tdiary/lang/en.rb
tdiary-5.0.14 lib/tdiary/lang/en.rb
tdiary-5.0.13 lib/tdiary/lang/en.rb
tdiary-5.0.12.1 lib/tdiary/lang/en.rb
tdiary-5.0.11 lib/tdiary/lang/en.rb
tdiary-5.0.10 lib/tdiary/lang/en.rb
tdiary-5.0.9 lib/tdiary/lang/en.rb
tdiary-5.0.8 lib/tdiary/lang/en.rb