Method: GetText::RGetText.generate_pot_header

Defined in:
lib/gettext/tools/rgettext.rb

.generate_pot_headerObject

:nodoc:



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/gettext/tools/rgettext.rb', line 67

def generate_pot_header # :nodoc:
  time = Time.now.strftime("%Y-%m-%d %H:%M")
  off = Time.now.utc_offset
  sign = off <= 0 ? '-' : '+'
  time += sprintf('%s%02d%02d', sign, *(off.abs / 60).divmod(60))
 
  "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER\n# This file is distributed under the same license as the PACKAGE package.\n# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n#\n#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: PACKAGE VERSION\\\\n\"\n\"POT-Creation-Date: \#{time}\\\\n\"\n\"PO-Revision-Date: \#{time}\\\\n\"\n\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\\\n\"\n\"Language-Team: LANGUAGE <[email protected]>\\\\n\"\n\"MIME-Version: 1.0\\\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\\\n\"\n\"Content-Transfer-Encoding: 8bit\\\\n\"\n\"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\\\\n\"\n"
end