Laravel-Backpack / activity-log

MIT License
29 stars 7 forks source link

Translations #46

Open raorsa opened 11 hours ago

raorsa commented 11 hours ago

the translations identifier

'backpack.activity-log::activity_log.causer_model'

not show value

but change this line to

'backpack::activity_log.causer_model'

He show correct value

backpack-ai-bot[bot] commented 11 hours ago

🚨 Bot is not sure about this answer. Please verify. 🚨

Based on the information provided in the knowledge sources, I don't have enough specific details to directly address your issue with the translation identifier 'backpack.activity-log::activity_log.causer_model'. However, I can provide some general guidance on how Backpack handles translations:

  1. Backpack uses Laravel's default language configuration to determine the admin panel language. This is set in the config/app.php file under the locale key Backpack Documentation.

  2. If you need to customize or correct translations, you can create a new file in resources/lang/vendor/backpack/en/base.php (or the appropriate language folder). Any language strings in this file will be preferred over the ones in the package Backpack Documentation.

  3. The format of the translation key you're using ('backpack.activity-log::activity_log.causer_model') seems unusual. Typically, Backpack uses a format like 'backpack::base.already_have_an_account' for its translations Backpack Documentation.

  4. Your modified key 'backpack::activity_log.causer_model' follows the more standard format, which might explain why it's working correctly.

To resolve your issue, you could try:

  1. Check if the translation exists in the correct language file.
  2. Ensure that the language file is in the correct location.
  3. If you've recently added or modified translations, make sure to clear your application's cache.

If the problem persists, you might want to check the Backpack documentation or reach out to the Backpack community for more specific assistance, as the provided knowledge sources don't contain enough information to definitively solve this particular translation issue.

ℹ️ Please note our AI Bot does not reply to follow-ups, this will be the only AI answer in this thread. If the AI helped you find the answer, please mark it as answered or write details below so it can learn. Then close the conversation. If not, please give more information for when a human reads this. ℹ️

Relevant sources:

Github Issue (closed): Any way to translate / rename model in the backend? Github Issue (closed): [Bug] translatable model not showing correct language translations in edit form Github Issue (closed): [Bug] translatable models not showing correct locale Github Issue (closed): [Bug] Edit title and headline should put the entity name inside of the translation FAQs for the admin UI|Customize the translated strings (aka overwrite the language files) Github Issue (closed): [Bug] Create & Show operation stopped showing the translated attributes *[Github Issue (closed): [Bug] crud translatable model not affect by ?_locale=](https://github.com/Laravel-Backpack/CRUD/issues/4326) Typo backback > backpack [4.1] [Fix] display translatable field in relationship Github Issue (closed): [Possible bug] HasOne with translatable repeatable is not translating. Github Issue (closed): "HasTranslations" does not work for me Github Issue (closed): select2_multiple 'array to string conversion' error - tries to save on parent model Correct the the column configuration variable name Github Issue (closed): [Bug] Save and back with translations**