openeuropa / oe_whitelabel

European Union Public License 1.2
2 stars 4 forks source link

Improve translatability #231

Open drishu opened 1 year ago

drishu commented 1 year ago

Found two elements that could use a better setup

  1. here https://github.com/openeuropa/oe_whitelabel/blob/1.x/templates/list_pages/node--oe-list-page--full.html.twig#L9 we could use the |t filter
  2. In whitelabel search, fields like this one https://github.com/openeuropa/oe_whitelabel/blob/1.x/modules/oe_whitelabel_search/config/schema/oe_whitelabel_search.schema.yml#L27 should be text or marked as translatable so config translation can pick it up
  3. here https://github.com/openeuropa/oe_whitelabel/blob/1.x/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module#L239 the paragraph entities should be fetched translated \Drupal::service('entity.repository')->getTranslationFromContext.. (and to many references to card)
  4. Static strings lile "Page content" need to be passed through t function