https://localize.drupal.org/translate/languages/uk/translate?sid=2422038
https://localize.drupal.org/translate/languages/uk/translate?sid=2422042

etc.

Coming from permission files like:

administer taxonomy:
  title: 'Administer vocabularies and terms'

permission_callbacks:
  - Drupal\taxonomy\TaxonomyPermissions::permissions
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy created an issue. See original summary.

Gábor Hojtsy’s picture

Status: Active » Needs review
FileSize
807 bytes

This should fail based on strings found above.

Gábor Hojtsy’s picture

Issue tags: +Drupal 8 compatibility
Gábor Hojtsy’s picture

(Stopping for today).

Status: Needs review » Needs work

The last submitted patch, 2: 2601824.patch, failed testing.

herom’s picture

Nice catch!

The "top_level_translatables" key was meant to extract value from "key: value"s at the top level, except it was recursively carried on to every level.

This patch should fix that.

herom’s picture

Status: Needs work » Needs review
Gábor Hojtsy’s picture

Status: Needs review » Needs work

Yay, makes sense :)

+++ b/potx.inc
@@ -2043,8 +2043,8 @@ function _potx_parse_yaml_file($code, $file_name, $file_path, $save_callback) {
-function _potx_find_yaml_translatables($yaml, $trans_list, $file_name, $save_callback) {
-  $extract_values = $trans_list['top_level_translatables'];
+function _potx_find_yaml_translatables($yaml, $trans_list, $file_name, $save_callback, $top_level) {
+  $extract_values = $top_level && $trans_list['top_level_translatables'];

Let's document the undocumented params. :) The file name and save callback can be copy pasted.

herom’s picture

Status: Needs work » Needs review
FileSize
723 bytes
2.69 KB

Added documentation for params.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good now :) Thanks!

  • herom committed 3e47f9e on 7.x-3.x
    Issue #2601824 by herom, Gábor Hojtsy: Permissions callback names...
herom’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.