Commit Graph

32 Commits

Author SHA1 Message Date
GitLab Bot e91cb68359 Add latest changes from gitlab-org/gitlab@master 2020-12-09 15:10:12 +00:00
GitLab Bot 2a0815d5fc Add latest changes from gitlab-org/gitlab@master 2020-11-24 03:09:18 +00:00
GitLab Bot 37699393e9 Add latest changes from gitlab-org/gitlab@master 2020-11-13 15:09:24 +00:00
GitLab Bot 8846ca0ed6 Add latest changes from gitlab-org/gitlab@master 2020-08-31 18:10:43 +00:00
GitLab Bot bfce95a4c5 Add latest changes from gitlab-org/gitlab@master 2020-08-18 21:09:57 +00:00
GitLab Bot 4203215d54 Add latest changes from gitlab-org/gitlab@master 2020-08-17 12:10:12 +00:00
GitLab Bot db73de5d6d Add latest changes from gitlab-org/gitlab@master 2020-08-07 21:10:07 +00:00
GitLab Bot 37419c44f0 Add latest changes from gitlab-org/gitlab@master 2020-08-06 18:09:41 +00:00
GitLab Bot 8bb9ee8769 Add latest changes from gitlab-org/gitlab@master 2020-07-31 21:10:12 +00:00
GitLab Bot 6f9f4f0580 Add latest changes from gitlab-org/gitlab@master 2020-07-29 12:09:45 +00:00
GitLab Bot 8827c1d184 Add latest changes from gitlab-org/gitlab@master 2020-07-27 12:09:50 +00:00
GitLab Bot d283729810 Add latest changes from gitlab-org/gitlab@master 2020-07-25 09:09:33 +00:00
GitLab Bot 19c226e242 Add latest changes from gitlab-org/gitlab@master 2020-07-24 15:09:39 +00:00
GitLab Bot f05ceb978a Add latest changes from gitlab-org/gitlab@master 2020-07-22 21:09:50 +00:00
GitLab Bot 2c171fdd72 Add latest changes from gitlab-org/gitlab@master 2020-07-22 12:09:42 +00:00
Małgorzata Ksionek 18a4afc50e Add code review remarks 2019-09-10 13:22:21 +02:00
Bob Van Landuyt 8472fa0807 Build correct variables for testing translations
This makes sure we build the correct variables for testing
translations.

When translating, we could be specifying the variables in different
forms for each id:

- In the singular we could be using a `%{hash}` interpolation
- In the plural we could be using a `%d` interpolation

This changes the tests to accommodate for that: We now use the
variables used in the relevant translation id as the source for the
variables we mix in in specs.
2019-09-10 13:22:21 +02:00
Andrew Newdigate 3288e1a874 Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
Takuya Noguchi e902f462c2 Eliminate duplicated words
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2018-11-22 01:01:23 +09:00
gfyoung 7ec8af5017 Enable even more frozen string for lib/gitlab
Enables frozen string for the following:

* lib/gitlab/hook_data/**/*.rb
* lib/gitlab/i18n/**/*.rb
* lib/gitlab/import/**/*.rb
* lib/gitlab/import_export/**/*.rb
* lib/gitlab/kubernetes/**/*.rb
* lib/gitlab/legacy_github_import/**/*.rb
* lib/gitlab/manifest_import/**/*.rb
* lib/gitlab/metrics/**/*.rb
* lib/gitlab/middleware/**/*.rb

Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-16 17:41:14 -08:00
Bob Van Landuyt 17fc178cb5 Correctly translate all forms in tests 2018-06-15 14:58:47 +02:00
Bob Van Landuyt 3b5ce6945d Validate PO-variable usage in message ids
That way we can detect incorrect usage before the strings are added to
Crowdin for translation
2018-06-15 14:58:46 +02:00
Bob Van Landuyt ca065e493e Forbids combining named and unnamed variables in `gitlab.pot`
This would break with an argument error when interpolating using
`sprintf` in ruby.
2018-06-15 14:58:46 +02:00
Bob Van Landuyt 7199e882db Only require `simple_po_parser` in rake task that needs it
That way we don't need to install it in production, since it's really
not needed there.
2017-09-04 08:30:10 +02:00
Bob Van Landuyt 4761235f69 Validate unescaped `%` chars in PO files 2017-09-01 13:44:10 +02:00
Bob Van Landuyt 538104bdd1 Fetch all translation keys using a regex 2017-08-31 21:13:02 +02:00
Bob Van Landuyt abe198723d Take `nplurals` into account when validating translations. 2017-08-31 21:13:02 +02:00
Bob Van Landuyt 2c4f9b7a73 Check for newlines in different methods on TranslationEntry 2017-08-31 21:13:02 +02:00
Bob Van Landuyt f35a5d0d99 Split translation & metadata entries into classes 2017-08-31 21:13:01 +02:00
Bob Van Landuyt c6d969949e Validate the number of plurals in an entry 2017-08-31 21:13:01 +02:00
Bob Van Landuyt cdaf1072da Move detailed information of an entry into a separate class 2017-08-31 21:13:01 +02:00
Bob Van Landuyt 0fa0ed7d85 Move `PoLinter` into `Gitlab::I18n` 2017-08-31 21:13:00 +02:00