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

Refactor intltool related code, and add proper testing #5362

Merged
merged 10 commits into from Nov 18, 2016

Conversation

Projects
None yet
4 participants
@stefwalter
Copy link
Contributor

commented Nov 11, 2016

We're not a standard intltool project, so lets just focus on
the stuff we use and need:

  • Cleanup use of translations in C code
  • Install mo files in LC_MESSAGES
  • Install po.xx.js files
  • Only extract relevant strings into js and mo files
  • Have a standard update-po target ... that also works in the po directory.
  • Detect unmarked translations in 'make check' (not needed)
  • Have real tests for localization.

We won't cover things like translatable attributes in our update-po and check targets yet.

@stefwalter stefwalter force-pushed the stefwalter:translations-cleanup branch from c29e992 to 1fd8986 Nov 11, 2016

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 11, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362

@stefwalter stefwalter force-pushed the stefwalter:translations-cleanup branch from 1fd8986 to 728ae15 Nov 14, 2016

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 14, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362

@stefwalter stefwalter force-pushed the stefwalter:translations-cleanup branch from 728ae15 to e6326e4 Nov 14, 2016

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 14, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362

@stefwalter stefwalter force-pushed the stefwalter:translations-cleanup branch from e6326e4 to 45ca3c8 Nov 15, 2016

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 15, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362

@stefwalter stefwalter changed the title WIP: Refactor and remove cruft from our intltool usage Refactor intltool related code, and add proper testing Nov 15, 2016

@stefwalter stefwalter force-pushed the stefwalter:translations-cleanup branch from 45ca3c8 to 651e2bc Nov 15, 2016

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 15, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362

@stefwalter stefwalter force-pushed the stefwalter:translations-cleanup branch from 651e2bc to 77697f2 Nov 15, 2016

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 15, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362

@stefwalter stefwalter force-pushed the stefwalter:translations-cleanup branch from 77697f2 to 4bb0a07 Nov 15, 2016

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 15, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362

@stefwalter stefwalter force-pushed the stefwalter:translations-cleanup branch from 4bb0a07 to e63c8d5 Nov 15, 2016

@dperpeet

This comment has been minimized.

Copy link
Member

commented Nov 16, 2016

needs rebase

@dperpeet dperpeet added the needswork label Nov 16, 2016

@stefwalter stefwalter force-pushed the stefwalter:translations-cleanup branch from e63c8d5 to 9f5c86e Nov 16, 2016

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 16, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362
@stefwalter

This comment has been minimized.

Copy link
Contributor Author

commented Nov 16, 2016

Rebase resolved automatically.

@stefwalter stefwalter removed the needswork label Nov 16, 2016

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 17, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 17, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362
@@ -40,7 +40,7 @@
<tr>
<td className="top">
<label className="control-label" for="control-1">
{_("Label")}
{"Label"}

This comment has been minimized.

Copy link
@mvollmer

mvollmer Nov 17, 2016

Member

If this shouldn't be translated, then we can just write <label ...>Label</label>, no?

This comment has been minimized.

Copy link
@mvollmer

mvollmer Nov 17, 2016

Member

For your convenience :-) mvollmer@bfeddde

This comment has been minimized.

Copy link
@stefwalter

stefwalter Nov 17, 2016

Author Contributor

Thanks. Squashed into the relevant commit.

@mvollmer mvollmer added the priority label Nov 17, 2016

@stefwalter stefwalter force-pushed the stefwalter:translations-cleanup branch from 9f5c86e to c1e3ff6 Nov 17, 2016

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 17, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 17, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362

@petervo petervo added the needswork label Nov 17, 2016

@petervo

This comment has been minimized.

Copy link
Contributor

commented Nov 17, 2016

Seems jsx files may not be getting processed. I'm not seeing strings from the selinux jsx files in the generated po files.

stefwalter added some commits Nov 11, 2016

ws: Move the remotectl command into the ws directory
This is how its distributed, and how it logically fits.

The prompting factor is translations and long term packaging.
bridge: Move CockpitConnect and CockpitStream into bridge directory
This is the only place its used. In addition we want the translations
to either be in the front end or in the ws directory.
po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes #5362
playground: Remove unneeded translations from playground
This is because we don't want to force translators to translate
all this arbitrary text.

Signed-off-by: Marius Vollmer <mvollmer@redhat.com>
 * FIXUP - {"foo"} -> foo
base1: Make cockpit.translate() arguments more flexible
Allow passing multiple elements, or an array of elements
to cockpit.transtlate(). This allows us to directly pass
a jQuery selection to cockpit.translate() and makes calling
it based on Mustache output much easier.
base1: Update test-locale.js to use common translatable strings
We shouldn't use bogus strings here because it causes translators
work to translate these bogus strings.
po: Update the po translation files
This was done using 'make update-po'

@stefwalter stefwalter force-pushed the stefwalter:translations-cleanup branch from c1e3ff6 to 23088fa Nov 17, 2016

@stefwalter stefwalter removed the needswork label Nov 17, 2016

@stefwalter

This comment has been minimized.

Copy link
Contributor Author

commented Nov 17, 2016

Added missing .jsx and .es6 to make update-po target and po files.

@mvollmer

This comment has been minimized.

Copy link
Member

commented Nov 17, 2016

We see this for some rhel-atomic, fedora-25, and debian-unstable:

make: *** No rule to make target 'doc/guide/html', needed by 'distdir'.  Stop.

(No idea what is common here, maybe master was different for those test runs.)

@mvollmer mvollmer added the needswork label Nov 17, 2016

@mvollmer

This comment has been minimized.

Copy link
Member

commented Nov 17, 2016

(No idea what is common here, maybe master was different for those test runs.)

They all ran on dragon.

@stefwalter stefwalter removed the needswork label Nov 18, 2016

@stefwalter

This comment has been minimized.

Copy link
Contributor Author

commented Nov 18, 2016

I don't think those failures have to do with this pull request. They must have to do with #5425 and using the same builddir when testing one or the other.

stefwalter added a commit to stefwalter/cockpit that referenced this pull request Nov 18, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes cockpit-project#5362

@mvollmer mvollmer merged commit ceb2e72 into cockpit-project:master Nov 18, 2016

13 checks passed

avocado/fedora-24 Tests passed
Details
container/kubernetes Tests passed
Details
selenium/chrome Tests passed
Details
selenium/firefox Tests passed
Details
semaphoreci The build passed on Semaphore.
Details
verify/centos-7 Tests passed
Details
verify/debian-8 Tests passed
Details
verify/debian-unstable Tests passed
Details
verify/fedora-25 Tests passed
Details
verify/fedora-atomic Tests passed
Details
verify/rhel-7 Tests passed
Details
verify/rhel-atomic Tests passed
Details
verify/ubuntu-1604 Tests passed
Details

mvollmer added a commit that referenced this pull request Nov 18, 2016

po: Refactor and remove cruft from our intltool usage
We're not a standard intltool project, so lets just focus on
the stuff we use and need:

 * Install mo files in LC_MESSAGES
 * Install po.xx.js files
 * Have a standard update-po target
 * Detect unmarked translations in 'make check'

Closes #5362

@stefwalter stefwalter deleted the stefwalter:translations-cleanup branch Nov 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.