Skip to content

Commit

Permalink
add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io committed Apr 18, 2024
2 parents c45f8c2 + 7dac48c commit eef0afc
Show file tree
Hide file tree
Showing 17 changed files with 534 additions and 179 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,51 @@ php artisan filament-plugins:widget

it will generate the files for you and you can use it directly, please note that you need to generate the model first than use other commands

## List your package on the plugins list

you can list your package on the plugins list by adding this a json file in your package root folder with name `filament-plugin.json` with content like this:

```json
{
"name": "FilamentAccounts",
"alias": "filament-accounts",
"description": {
"ar": "full accounts manager with API\/Notifications\/Contacts to manage your contacts and accounts",
"en": "full accounts manager with API\/Notifications\/Contacts to manage your contacts and accounts",
"gr": "full accounts manager with API\/Notifications\/Contacts to manage your contacts and accounts",
"sp": "full accounts manager with API\/Notifications\/Contacts to manage your contacts and accounts"
},
"keywords": [],
"priority": 0,
"providers": [
"TomatoPHP\\FilamentAccounts\\FilamentAccountsServiceProvider"
],
"files": [],
"title": {
"ar": "Filament Accounts",
"en": "Filament Accounts",
"gr": "Filament Accounts",
"sp": "Filament Accounts"
},
"color": "#007dff",
"icon": "heroicon-c-user-circle",
"pages": [
],
"resources": [],
"widgets": [],
"placeholder": "placeholder.webp",
"type": "lib",
"version": "v1.0",
"github" : "https://github.com/tomatophp/filament-accounts",
"docs" : "https://github.com/tomatophp/filament-accounts"
}
```

make sure you allow packages scan on the `filament-plugins.php` config file

```php
'scan' => true
```

## Publish Assets

Expand Down
4 changes: 3 additions & 1 deletion config/filament-plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"enabled" => true
],

'database_prefix' => null
'database_prefix' => null,

'scan' => true
];

3 changes: 0 additions & 3 deletions resources/lang/ar.json

This file was deleted.

99 changes: 98 additions & 1 deletion resources/lang/ar/messages.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,102 @@
<?php

return [

'group' => 'الإعدادات',
'plugins' => [
'title' => 'الاضافات',
'create' => 'إنشاء اضافة جديدة',
'import' => 'استيراد اضافة',
'form' => [
'name' => 'الاسم',
'name-placeholder' => 'e.g. My Plugin',
'description' => 'الوصف',
'description-placeholder' => 'e.g. A simple plugin for Filament',
'icon' => 'الايقونة',
'color' => 'اللون',
'file' => 'ملف الاضافة المضغوط',
],
'actions' => [
'generate' => 'توليد',
'active' => 'تفعيل',
'disable' => 'إبطال',
'delete' => 'حذف',
'github' => 'جيت هاب',
'docs' => 'عن الاضافة',
],
'notifications' => [
'autoload' => [
'title' => 'خطأ',
'body' => 'عفواً لا يمكن تفعيل هذه الاضافة قبل تشغيل الامر composer dump-autoload في الطرفية'
],
'enabled' => [
'title' => 'عملية ناجحة',
'body' => 'تم تفعيل الاضافة بنجاح'
],
'deleted' => [
'title' => 'عملية ناجحة',
'body' => 'تم حذف الاضافة بنجاح'
],
'disabled' => [
'title' => 'عملية ناجحة',
'body' => 'تم تبطيل الاضافة بنجاح'
],
'import' => [
'title' => 'عملية ناجحة',
'body' => 'تم استيراد الاضافة بنجاح'
]
]
],
'tables' => [
'title' => 'الجداول',
'create' => 'إنشاء جدول جديد',
'edit' => 'تعديل الجدول',
'columns' => 'أعمدة الجدول',
'form' => [
'name' => 'الاسم',
'type' => 'النوع',
'nullable' => 'يمكن أن يكون فارغاً',
'foreign' => 'خارجي',
'foreign_table' => 'جدول خارجي',
'foreign_col' => 'عمود خارجي',
'foreign_on_delete_cascade' => 'عند الحذف يتبع',
'auto_increment' => 'تزايد تلقائياً',
'primary' => 'رئيسي',
'unsigned' => 'غير سالب',
'default' => 'افتراضي',
'unique' => 'فريد',
'index' => 'فهرس',
'lenth' => 'الطول',
'migrated' => 'تم التهجير',
'generated' => 'تم التوليد',
'created_at' => 'تاريخ الإنشاء',
'updated_at' => 'تاريخ التحديث',
],
'actions' => [
'create' => 'إنشاء جدول',
'migrate' => 'تهجير',
'generate' => 'توليد',
'columns' => 'اضافة عمود',
'add-id' => 'إضافة عمود ID',
'add-timestamps' => 'إضافة الوقت',
'add-softdeletes' => 'إضافة حذف ناعم',
],
'notifications' => [
'migrated' => [
'title' => 'عملية ناجحة',
'body' => 'تم تهجير الجدول بنجاح'
],
'not-migrated' => [
'title' => 'خطأ',
'body' => 'لا يمكن تهجير الجدول'
],
'generated' => [
'title' => 'عملية ناجحة',
'body' => 'تم توليد الجدول بنجاح'
],
'model' => [
'title' => 'خطأ',
'body' => 'لا يمكن توليد النموذج'
]
]
]
];
3 changes: 0 additions & 3 deletions resources/lang/en.json

This file was deleted.

99 changes: 98 additions & 1 deletion resources/lang/en/messages.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,102 @@
<?php

return [

'group' => 'Settings',
'plugins' => [
'title' => 'Plugins',
'create' => 'Create Plugin',
'import' => 'Import Plugin',
'form' => [
'name' => 'Name',
'name-placeholder' => 'e.g. My Plugin',
'description' => 'Description',
'description-placeholder' => 'e.g. A simple plugin for Filament',
'icon' => 'Icon',
'color' => 'Color',
'file' => 'Plugin ZIP file',
],
'actions' => [
'generate' => 'Generate',
'active' => 'Active',
'disable' => 'Disable',
'delete' => 'Delete',
'github' => 'Github',
'docs' => 'Docs',
],
'notifications' => [
'autoload' => [
'title' => 'Error',
'body' => 'The plugin could not be activated because the class could not be found. please run composer dump-autoload on your terminal'
],
'enabled' => [
'title' => 'Success',
'body' => 'The plugin has been activated successfully.'
],
'deleted' => [
'title' => 'Success',
'body' => 'The plugin has been deleted successfully.'
],
'disabled' => [
'title' => 'Success',
'body' => 'The plugin has been deactivated successfully.'
],
'import' => [
'title' => 'Success',
'body' => 'The plugin has been imported successfully.'
]
]
],
'tables' => [
'title' => 'Tables',
'create' => 'Create Table',
'edit' => 'Edit Table',
'columns' => 'Table Columns',
'form' => [
'name' => 'Name',
'type' => 'Type',
'nullable' => 'Nullable',
'foreign' => 'Foreign',
'foreign_table' => 'Foreign Table',
'foreign_col' => 'Foreign Column',
'foreign_on_delete_cascade' => 'On Delete Cascade',
'auto_increment' => 'Auto Increment',
'primary' => 'Primary',
'unsigned' => 'Unsigned',
'default' => 'Default',
'unique' => 'Unique',
'index' => 'Index',
'lenth' => 'Length',
'migrated' => 'Migrated',
'generated' => 'Generated',
'created_at' => 'Created At',
'updated_at' => 'Update At',
],
'actions' => [
'create' => 'Create Table',
'migrate' => 'Migrate',
'generate' => 'Generate',
'columns' => 'Add Column',
'add-id' => 'Add ID Column',
'add-timestamps' => 'Add Timestamps',
'add-softdeletes' => 'Add Soft Deletes',
],
'notifications' => [
'migrated' => [
'title' => 'Success',
'body' => 'The table has been migrated successfully.'
],
'not-migrated' => [
'title' => 'Error',
'body' => 'The table could not be migrated.'
],
'generated' => [
'title' => 'Success',
'body' => 'The table has been generated successfully.'
],
'model' => [
'title' => 'Error',
'body' => 'The model could not be found generate it first.'
]
]
]
];
Loading

0 comments on commit eef0afc

Please sign in to comment.