Issue #3086941: Update experimental theme/module installation warning to include Oxford comma
1 open thread
Closes #3086941
Merge request reports
Activity
added 1 commit
added 1 commit
- Resolved by nicxvan
added 1 commit
- Resolved by Tyler Staples
added 1 commit
added 1 commit
117 117 '@theme' => $get_label($theme), 118 118 // It is safe to implode this because theme names are not translated 119 119 // markup and so will not be double-escaped. 120 '@required' => implode(', ', array_map($get_label, $dependencies)), 120 '@required' => (function ($items) { 121 $count = count($items); 122 if ($count <= 1) { 123 return implode('', $items); 124 } 125 if ($count == 2) { 126 return implode(' and ', $items); 127 } 128 $last = array_pop($items); 129 return $items ? implode(', ', $items) . ', and ' . $last : $last; 130 })(array_map($get_label, $dependencies)), - Comment on lines -120 to +130
Isn't this introducing a regression for non-English translations? Suddenly they have the English word "and" in a non-translated string placeholder that they can't manipulate.
I believe the correct way to fix this is something like:
You must install the following modules to install Foo:
- Bar
With the plural case being:
You must install the following modules to install Navigation:
- Many
- Different
- Things
Please register or sign in to reply