verbb / smith

A Craft CMS plugin to add copy, paste and clone functionality to Matrix blocks.
MIT License
25 stars 9 forks source link

Need to use app.php instead of smith.php for translation #41

Closed pascalminator closed 2 months ago

pascalminator commented 2 months ago

Describe the bug

App.php should be replaced with smith.php for translations. Currently, I have to create a generic app.php file in my translations folder in order to be able to translate this plugin.

Steps to reproduce

  1. Create smith.php in your translations folder
  2. Does not work and the plugin is still in english
  3. Rename smith.php for app.php
  4. Translation now works properly

Craft CMS version

4.10.2

Plugin version

2.0.1

Multi-site?

No

Additional context

French translation, if you want to include it to the plugin and save me from having to create a pull request just for that:

<?php

return [ 'Copy' => 'Copier', 'Paste' => 'Coller', 'Clone' => 'Cloner', '1 block copied' => '1 bloc copié', '{n} blocks copied' => '{n} blocs copiés', ];

engram-design commented 2 months ago

There are indeed only a few translated strings in the plugin, and these are under the app category because Craft already includes these strings in the app category, so it seemed unnecessary to translate them twice.

But yes, I might just add those to the smith category anyway for clarity.