Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supporting custom headers in generated PO files #184

Open
zeke opened this issue Mar 10, 2021 · 1 comment
Open

supporting custom headers in generated PO files #184

zeke opened this issue Mar 10, 2021 · 1 comment

Comments

@zeke
Copy link
Contributor

zeke commented Mar 10, 2021

Hi @grosser 👋🏼

I'd like to be able to customize the header output that's generated in PO files when running rake gettext:find. Currently there are some placeholder values like FIRST AUTHOR, COPYRIGHT HOLDER, FULL_NAME, etc:

# English translations for foo package.
# Copyright (C) 2021 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the foo package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
#
msgid ""
msgstr ""
"Project-Id-Version: github 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-01-22 21:21-0800\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"\n"

I opened an issue on the ruby-gettext/gettext repo, where @kou pointed out that:

You need to add --translator, --translator-name=XXX, --translator-email=YYY options to msginit.
It seems that https://github.com/grosser/gettext_i18n_rails/blob/master/lib/gettext_i18n_rails/tasks.rb provides APIs to add options to msgmerge, msgcat and xgettext but doesn't provide an API to add options to msginit.

Is this something you'd be open to adding support for in gettext_i18n_rails? If so, I'd be happy to help on it but might need a little guidance along the way.

cc @bigzoo @mjacbous @southgate

@grosser
Copy link
Owner

grosser commented Mar 10, 2021

PR welcome ... should be easy to do by either passing through some options or env-vars ... just make sure it's not required :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants