Skip to content

Commit

Permalink
potFormatter: Use translator comments instad of extracted comments fo…
Browse files Browse the repository at this point in the history
…r message description
  • Loading branch information
Ruben Costa committed Jul 30, 2017
1 parent cb1239b commit 5c0e18d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/json2po/potFormatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const buildMessage = copyDefaultTranslation => ({
translatedMessage,
}) =>
[
`#. ${description}`,
`# ${description}`,
`#: ${reference}`,
`msgctxt "${id}"`,
`msgid "${defaultMessage}"`,
Expand Down
12 changes: 6 additions & 6 deletions test/fixtures/pot/extracted.pot
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
#. a message of the a module
# a message of the a module
#: src_test/moduleA.json
msgctxt "a.a"
msgid "the a message"
msgstr ""

#. b message of the a module
# b message of the a module
#: src_test/moduleA.json
msgctxt "a.b"
msgid "the b message"
msgstr ""

#. c message of the a module
# c message of the a module
#: src_test/moduleA.json
msgctxt "a.c"
msgid "the a message"
msgstr ""

#. a message of the b module
# a message of the b module
#: src_test/moduleB.json
msgctxt "b.a"
msgid "the a message"
msgstr ""

#. b message of the b module
# b message of the b module
#: src_test/moduleB.json
msgctxt "b.b"
msgid "the b message"
msgstr ""

#. c message of the b module
# c message of the b module
#: src_test/moduleB.json
msgctxt "b.c"
msgid "the c message"
Expand Down
12 changes: 6 additions & 6 deletions test/fixtures/pot/extractedWithDefault.po
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
#. a message of the a module
# a message of the a module
#: src_test/moduleA.json
msgctxt "a.a"
msgid "the a message"
msgstr "the a message"

#. b message of the a module
# b message of the a module
#: src_test/moduleA.json
msgctxt "a.b"
msgid "the b message"
msgstr "the b message"

#. c message of the a module
# c message of the a module
#: src_test/moduleA.json
msgctxt "a.c"
msgid "the a message"
msgstr "the a message"

#. a message of the b module
# a message of the b module
#: src_test/moduleB.json
msgctxt "b.a"
msgid "the a message"
msgstr "the a message"

#. b message of the b module
# b message of the b module
#: src_test/moduleB.json
msgctxt "b.b"
msgid "the b message"
msgstr "the b message"

#. c message of the b module
# c message of the b module
#: src_test/moduleB.json
msgctxt "b.c"
msgid "the c message"
Expand Down
12 changes: 6 additions & 6 deletions test/fixtures/pot/extractedWithHeader.pot
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
test header

#. a message of the a module
# a message of the a module
#: src_test/moduleA.json
msgctxt "a.a"
msgid "the a message"
msgstr ""

#. b message of the a module
# b message of the a module
#: src_test/moduleA.json
msgctxt "a.b"
msgid "the b message"
msgstr ""

#. c message of the a module
# c message of the a module
#: src_test/moduleA.json
msgctxt "a.c"
msgid "the a message"
msgstr ""

#. a message of the b module
# a message of the b module
#: src_test/moduleB.json
msgctxt "b.a"
msgid "the a message"
msgstr ""

#. b message of the b module
# b message of the b module
#: src_test/moduleB.json
msgctxt "b.b"
msgid "the b message"
msgstr ""

#. c message of the b module
# c message of the b module
#: src_test/moduleB.json
msgctxt "b.c"
msgid "the c message"
Expand Down

0 comments on commit 5c0e18d

Please sign in to comment.