Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | protected static function insertTranslation(Translations $translations, $key, $message) |
||
34 | { |
||
35 | $context_glue = '\u0004'; |
||
36 | $key = explode($context_glue, $key); |
||
37 | |||
38 | $context = isset($key[1]) ? array_shift($key) : ''; |
||
39 | $original = array_shift($key); |
||
40 | $translation = array_shift($message); |
||
41 | $plural_translation = array_shift($message); |
||
42 | |||
43 | $entry = $translations->insert($context, $original); |
||
44 | $entry->setTranslation($translation); |
||
45 | $entry->setPluralTranslation($plural_translation); |
||
46 | } |
||
47 | } |
||
48 |