Skip to content

Commit

Permalink
Merge pull request #82 from humhub-contrib/enh/77-reduce-translation-…
Browse files Browse the repository at this point in the history
…message-categories

Reduce translation message categories
  • Loading branch information
luke- authored Oct 18, 2024
2 parents 479addc + 0db8688 commit 5a514b5
Show file tree
Hide file tree
Showing 680 changed files with 4,447 additions and 8,099 deletions.
14 changes: 7 additions & 7 deletions controllers/CalendarController.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ public function actionSync($id)
try {
$calendarModel = $this->findModel($id);
$calendarModel->sync();
return ModalClose::widget(['success' => Yii::t('ExternalCalendarModule.sync_result', 'Sync successfull!')]);
return ModalClose::widget(['success' => Yii::t('ExternalCalendarModule.view', 'Sync successfull!')]);
} catch (InvalidValueException $e) {
Yii::error($e);
return ModalClose::widget(['error' => Yii::t('ExternalCalendarModule.sync_result', $e->getMessage())]);
return ModalClose::widget(['error' => Yii::t('ExternalCalendarModule.view', $e->getMessage())]);
} catch (NotFoundHttpException $e) {
Yii::error($e);
return ModalClose::widget(['error' => Yii::t('ExternalCalendarModule.sync_result', 'Calendar not found!')]);
return ModalClose::widget(['error' => Yii::t('ExternalCalendarModule.view', 'Calendar not found!')]);
} catch (\Exception $e) {
Yii::error($e);
return ModalClose::widget(['error' => Yii::t('ExternalCalendarModule.sync_result', 'An unknown error occured while synchronizing your calendar!')]);
return ModalClose::widget(['error' => Yii::t('ExternalCalendarModule.view', 'An unknown error occured while synchronizing your calendar!')]);
}
}

Expand All @@ -109,13 +109,13 @@ public function actionEdit($id = null)
if ($model->load(Yii::$app->request->post()) && $model->validate()) {
(new ICalSync(['calendarModel' => $model, 'skipEvents' => true]))->syncICal();
if (!$model->hasErrors()) {
$this->view->success(Yii::t('ExternalCalendarModule.results', 'Calendar successfully created!'));
$this->view->success(Yii::t('ExternalCalendarModule.view', 'Calendar successfully created!'));
return $this->redirect($this->contentContainer->createUrl('view', ['id' => $model->id]));
}
}
} catch (\Exception $e) {
Yii::warning($e);
$this->view->error(Yii::t('ExternalCalendarModule.results', 'Error while creating iCal File. Please check, if Url is correct and Internet connection of server is enabled.'));
$this->view->error(Yii::t('ExternalCalendarModule.view', 'Error while creating iCal File. Please check, if Url is correct and Internet connection of server is enabled.'));
}

return $this->render('edit', [
Expand All @@ -138,7 +138,7 @@ public function actionEdit($id = null)
public function actionDelete($id)
{
$this->findModel($id)->hardDelete();
$this->view->success(Yii::t('ExternalCalendarModule.results', 'Calendar successfully deleted!'));
$this->view->success(Yii::t('ExternalCalendarModule.view', 'Calendar successfully deleted!'));
return $this->redirect($this->contentContainer->createUrl('index'));
}

Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changelog
- Fix #78: Remove module name translation
- Enh #79: Replace theme variables with CSS variables
- Enh #81: Use PHP CS Fixer
- Enh #82: Reduce translation message categories

1.4.2 (January 19, 2023)
-----------------------
Expand Down
32 changes: 29 additions & 3 deletions messages/am/base.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,57 @@
<?php
return array (
return [
'<strong>Calendar</strong> export' => '',
'<strong>Confirm</strong> deleting' => '',
'Additional filters:' => '',
'All my spaces' => '',
'Allows the user to edit/delete existing external calendar' => '',
'Allows the user to edit/delete existing external calendar entries' => '',
'Are you sure you want to delete this item?' => '',
'Back to overview' => 'ወደሐተታው ተመለስ',
'Calendar {title}' => '',
'Calendar export name' => '',
'Cancel' => 'ይቅር',
'Close' => 'ዝጋ',
'Copy to clipboard' => 'ወደማስፈሪያሰሌዳው ገልብጥ።',
'Could not sync altered events of recurrent ical event' => '',
'Create' => '',
'Delete' => 'አስወግድ',
'Download' => '',
'Download as ICS file' => '',
'Edit' => 'ማስተካከያ',
'Edit Calendar {title}' => '',
'Edit export' => '',
'End time must be after start time!' => '',
'Error creating event in ical synchronization' => '',
'Error while synchronizing recurring ical event' => '',
'External Event' => '',
'Extends the Calendar-Module to show external calendars with iCal' => '',
'External Calendar' => '',
'External Calendar Entry' => '',
'External Calendars' => '',
'External Calendars Overview' => '',
'External Event' => '',
'Generate export Url' => '',
'In this view you can review and manually synchronize the calendar {title}.' => '',
'Include events from:' => '',
'Invalid space selection' => '',
'Manage external Calendar' => '',
'Manage external calendar for your profile.' => '',
'Manage external calendar here.' => '',
'Manage external entries' => '',
'My exports' => '',
'Name' => '',
'New export' => '',
'No spaces' => '',
'Only following spaces:' => '',
'Only include events I\'am participating' => '',
'Only include events I\'ve created' => '',
'Only include public events' => '',
'Please select at least one space.' => '',
'Profile' => '',
'There was an error while synchronizing an ical calendar' => '',
'This view lists all calenders configured for this space' => '',
'This view lists all calenders configured in your profile' => '',
'Update' => 'አዘምን',
'Url' => '',
'View' => 'ተመልከት',
);
];
10 changes: 0 additions & 10 deletions messages/am/config.php

This file was deleted.

21 changes: 0 additions & 21 deletions messages/am/export.php

This file was deleted.

23 changes: 0 additions & 23 deletions messages/am/model_calendar.php

This file was deleted.

15 changes: 0 additions & 15 deletions messages/am/model_calendar_entry.php

This file was deleted.

6 changes: 0 additions & 6 deletions messages/am/model_config.php

This file was deleted.

8 changes: 0 additions & 8 deletions messages/am/permissions.php

This file was deleted.

7 changes: 0 additions & 7 deletions messages/am/results.php

This file was deleted.

9 changes: 0 additions & 9 deletions messages/am/sync_result.php

This file was deleted.

56 changes: 56 additions & 0 deletions messages/am/view.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php
return [
'(No Title)' => '',
'A new Calendar has been added.' => '',
'Add Calendar' => '',
'Add external Calendar' => '',
'All Day' => '',
'An unknown error occured while synchronizing your calendar!' => '',
'Automatic synchronization' => '',
'Back to modules' => '',
'Calendar' => '',
'Calendar Extension Configuration' => '',
'Calendar not found!' => '',
'Calendar successfully created!' => '',
'Calendar successfully deleted!' => '',
'Color' => '',
'DT Stamp' => '',
'Daily' => 'ዕለታዊ',
'Description' => '',
'End Datetime' => '',
'Error while creating iCal File. Please check, if Url is correct and Internet connection of server is enabled.' => '',
'Error while creating ical... Check if link is reachable.' => '',
'Error while fetching ical' => '',
'Event Mode' => '',
'External Calendar: ' => '',
'External Calendars' => '',
'Hourly' => 'በየሰ' . "\0" . 'ዓቱ',
'ID' => 'መታወቂያ',
'Last Modified' => '',
'Location' => 'አቅጣጫ',
'No auto synchronization' => '',
'Only sync events from current month' => '',
'Only synchronize events from current month' => '',
'Original Calendar Name' => '',
'Original Calendar Scale' => '',
'Post new calendar on stream' => '',
'Post new entries on stream' => '',
'Private' => '',
'Public' => 'የህዝብ',
'Read full description...' => '',
'Save' => 'አስቀምጥ',
'Start Datetime' => '',
'Sync Calendar' => '',
'Sync successfull!' => '',
'Synchronization Mode' => '',
'Synchronization interval' => '',
'Synchronize all events' => '',
'Timezone' => '',
'Title' => 'ርዕስ',
'Title and Color' => '',
'UID' => '',
'Update {modelClass}: ' => '',
'Url' => '',
'e.g. https://calendar.google.com/calendar/ical/...' => '',
'iCal Version' => '',
];
6 changes: 0 additions & 6 deletions messages/am/views_admin.php

This file was deleted.

10 changes: 0 additions & 10 deletions messages/am/views_calendar.php

This file was deleted.

5 changes: 0 additions & 5 deletions messages/am/views_entry.php

This file was deleted.

7 changes: 0 additions & 7 deletions messages/am/widgets.php

This file was deleted.

32 changes: 29 additions & 3 deletions messages/an/base.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,57 @@
<?php
return array (
return [
'<strong>Calendar</strong> export' => '',
'<strong>Confirm</strong> deleting' => '',
'Additional filters:' => '',
'All my spaces' => '',
'Allows the user to edit/delete existing external calendar' => '',
'Allows the user to edit/delete existing external calendar entries' => '',
'Are you sure you want to delete this item?' => '',
'Back to overview' => '',
'Calendar {title}' => '',
'Calendar export name' => '',
'Cancel' => 'Cancelar',
'Close' => 'Zarrar',
'Copy to clipboard' => 'Copiar a o puertafuellas.',
'Could not sync altered events of recurrent ical event' => '',
'Create' => '',
'Delete' => 'Eliminar',
'Download' => '',
'Download as ICS file' => '',
'Edit' => 'Editar',
'Edit Calendar {title}' => '',
'Edit export' => '',
'End time must be after start time!' => '',
'Error creating event in ical synchronization' => '',
'Error while synchronizing recurring ical event' => '',
'External Event' => '',
'Extends the Calendar-Module to show external calendars with iCal' => '',
'External Calendar' => '',
'External Calendar Entry' => '',
'External Calendars' => '',
'External Calendars Overview' => '',
'External Event' => '',
'Generate export Url' => '',
'In this view you can review and manually synchronize the calendar {title}.' => '',
'Include events from:' => '',
'Invalid space selection' => '',
'Manage external Calendar' => '',
'Manage external calendar for your profile.' => '',
'Manage external calendar here.' => '',
'Manage external entries' => '',
'My exports' => '',
'Name' => '',
'New export' => '',
'No spaces' => '',
'Only following spaces:' => '',
'Only include events I\'am participating' => '',
'Only include events I\'ve created' => '',
'Only include public events' => '',
'Please select at least one space.' => '',
'Profile' => 'Perfil',
'There was an error while synchronizing an ical calendar' => '',
'This view lists all calenders configured for this space' => '',
'This view lists all calenders configured in your profile' => '',
'Update' => '',
'Url' => '',
'View' => '',
);
];
10 changes: 0 additions & 10 deletions messages/an/config.php

This file was deleted.

Loading

0 comments on commit 5a514b5

Please sign in to comment.