Skip to content

Commit

Permalink
Merge branch 'develop' into svg-img-role
Browse files Browse the repository at this point in the history
  • Loading branch information
Angamanga authored Nov 19, 2020
2 parents d8116c0 + 3b7dbca commit 150b4cc
Show file tree
Hide file tree
Showing 24 changed files with 89 additions and 29 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test-and-ship.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
npm install -g gulp;
npm install;
- name: List installed dependencies
run: |
npm ls || true;
- name: Run lint tests
if: ${{ matrix.run_lint_tests }}
run: |
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "المهمة للاستعمال الداخلي فقط",
"internal_use_task_desc": "هذه المهمة يكون ظاهرا فقط للمستعمل الذي لديه رخصة منصب الإدارة",
"duplicate_task": "مهمة مكررة",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "قم بعرض هذه المهمة للكل بعد النشر",
"show_this_task_to_desc": "عند نشر استجابة استطلاع ، سيتم عرض البيانات من هذه المهمة.",
"survey_name": "اسم الاستطلاع",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "بواسطة",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "اكتملت المهمة",
"everyone": "الكل",
"just_you": "أنت فقط",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/bg-BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "Задачата е само за вътрешна употреба",
"internal_use_task_desc": "Тази задача ще е само достъпна за потребители, които имат права да модерират публикации.",
"duplicate_task": "Копирай задача",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "Покажи тази задача на всеки, когато е публиквано",
"show_this_task_to_desc": "Когато отговор на допитване е публикувано, данните от тази задача ще бъдат показани.",
"survey_name": "Име на допитване",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "от",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "Задачата е завършена",
"everyone": "Всички",
"just_you": "Само ти",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "Úloha je určena pouze pro interní použití",
"internal_use_task_desc": "Tato úloha bude viditelná pouze pro uživatele, kteří mají oprávnění ke správě příspěvků.",
"duplicate_task": "Zdvojit úlohu",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "Zobrazit tuto úlohu všem při publikování",
"show_this_task_to_desc": "Při zveřejnění odpovědi na průzkum se zobrazí data z této úlohy.",
"survey_name": "Název průzkumu",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Zobrazování {{posts}} z {{total_nb}} příspěvků s informacemi o poloze na mapě.",
"search_results": "Výsledek:",
"by": "od",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "Úloha dokončena",
"everyone": "Kdokoliv",
"just_you": "Jen vy",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "Aufgabe ist nur für interne Nutzung vorgesehen",
"internal_use_task_desc": "This task will only be visible to User who have Manage Post permission.",
"duplicate_task": "Aufgabe duplizieren",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "Show this task to everyone when published",
"show_this_task_to_desc": "When a survey response is published, data from this task will be displayed.",
"survey_name": "Name der Umfrage",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "von",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "Aufgabe abgeschlossen",
"everyone": "Jeder",
"just_you": "Nur Sie",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "Función únicamente para uso interno",
"internal_use_task_desc": "Esta función sólo será visible para el usuario que tenga permiso de Administrador de Publicaciones.",
"duplicate_task": "Duplicar tarea",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "Mostrar esta tarea a todos cuando sea publicada",
"show_this_task_to_desc": "Cuando la respuesta a una encuesta sea publicada, los datos de esta tarea serán desplegados.",
"survey_name": "Nombre de encuesta",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "por",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "Tarea completada",
"everyone": "Todos",
"just_you": "Solamente usted",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/fa-IR.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "وظیفه فقط برای استفاده داخلی است",
"internal_use_task_desc": "این وظیفه فقط برای کاربرانی قابل مشاهده است که اجازه مدیریت نوشته را داشته باشند.",
"duplicate_task": "وظیفه تکراری",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "این وظیفه را وقتی که منتشر شد، به همه نشان بده",
"show_this_task_to_desc": "هنگامی که پاسخ یک نظرسنجی منتشر شد، داده های این وظیفه نمایش داده می شود.",
"survey_name": "نام نظرسنجی",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "توسط",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "وظیفه کامل شد",
"everyone": "همه",
"just_you": "فقط شما",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "Tâche seulement pour utilisation interne",
"internal_use_task_desc": "Cette tâche va être visible pour les utilisateurs ayant des droits d'édition de publications.",
"duplicate_task": "Dupliquer la tâche",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "Afficher cette tâche pour tout le monde après publication",
"show_this_task_to_desc": "Quand une réponse d'un témoignage va être donnée, les données liées à la tâche vont être affichées.",
"survey_name": "Nom du témoignage",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "par",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "Tâche terminée",
"everyone": "Tout le monde",
"just_you": "Juste vous",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "Task is only for internal use",
"internal_use_task_desc": "This task will only be visible to User who have Manage Post permission.",
"duplicate_task": "Dupliquer cette tâche",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "Afficher cette tâche à tous lorsqu'elle est publiée",
"show_this_task_to_desc": "Lorsqu'une réponse à l'enquête est publiée, les données de cette tâche seront affichées.",
"survey_name": "Nom du sondage",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "de",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "Tâche complétée",
"everyone": "Tous",
"just_you": "Vous uniquement",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "Ez a feladat csak belső használatra készült",
"internal_use_task_desc": "Ez a feladat azon felhasználók részére lesz látható, akiknek van Bejegyzés menedzselési jogosultsága.",
"duplicate_task": "Feladat duplikálása",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "Mutasd ezt a feladatot mindenkinek, amikor publikálásra került",
"show_this_task_to_desc": "Amikor egy bejegyzés publikálásra került, az adatok erről a feladatról megjelenítésre kerülnek.",
"survey_name": "Kérdőív neve",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "szerző:",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "Elvégzett feladat",
"everyone": "Mindenki",
"just_you": "Csak Te",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "タスクは内部使用にのみ使用されます。",
"internal_use_task_desc": "This task will only be visible to User who have Manage Post permission.",
"duplicate_task": "重複タスク",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "Show this task to everyone when published",
"show_this_task_to_desc": "When a survey response is published, data from this task will be displayed.",
"survey_name": "Survey name",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "by",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "Task completed",
"everyone": "Everyone",
"just_you": "Just you",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "De taak is alleen voor intern gebruik",
"internal_use_task_desc": "De taak is alleen zichtbaar voor gebruikers die plaatsingen mogen beheren",
"duplicate_task": "Taak dupliceren",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "Maak de taak zichtbaar voor iedereen indien gepubliceerd",
"show_this_task_to_desc": "When a survey response is published, data from this task will be displayed.",
"survey_name": "Formuliernaam",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "door",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "Taak afgerond",
"everyone": "Iedereen",
"just_you": "Alleen ik",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "A tarefa é apenas para uso interno",
"internal_use_task_desc": "Esta tarefa só será visível para o usuário que tenha permissão Gerenciar permissão.",
"duplicate_task": "Duplicar tarefa",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "Mostre essa tarefa a todos quando publicado",
"show_this_task_to_desc": "Quando uma resposta de pesquisa é publicada, os dados dessa tarefa serão exibidos.",
"survey_name": "Nome da pesquisa",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "por",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "Tarefa completada",
"everyone": "Todos",
"just_you": "Apenas você",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "Task is only for internal use",
"internal_use_task_desc": "This task will only be visible to User who have Manage Post permission.",
"duplicate_task": "Дубликат задачи",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "Show this task to everyone when published",
"show_this_task_to_desc": "When a survey response is published, data from this task will be displayed.",
"survey_name": "Survey name",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "от",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "Задача выполнена",
"everyone": "Для всех",
"just_you": "Только для вас",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "任務內容只做內部使用",
"internal_use_task_desc": "這個任務內容只會提供給管理資料的使用者",
"duplicate_task": "複製任務",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "在發布後顯示這個任務給所有人",
"show_this_task_to_desc": "When a survey response is published, data from this task will be displayed.",
"survey_name": "Survey name",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "by",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "任務已完成",
"everyone": "所有人",
"just_you": "只有你",
Expand Down
2 changes: 2 additions & 0 deletions app/common/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"internal_use_task": "Task is only for internal use",
"internal_use_task_desc": "This task will only be visible to User who have Manage Post permission.",
"duplicate_task": "重复任务",
"duplicate_option": "Duplicate option is present",
"show_this_task_to": "任务向每人展示当已发表的",
"show_this_task_to_desc": "When a survey response is published, data from this task will be displayed.",
"survey_name": "调查名称",
Expand Down Expand Up @@ -640,6 +641,7 @@
"posts_total_map": "Displaying {{posts}} of {{total_nb}} posts with location information on the map.",
"search_results": "Results:",
"by": "由",
"duplicate_option": "There's a problem with the configuration of this field because of duplicates, please go to the survey-settings and fix it.",
"task_completed": "任务已完成",
"everyone": "所有人",
"just_you": "只有您",
Expand Down
19 changes: 10 additions & 9 deletions app/common/services/translation.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,18 @@ function (
});
}
});
moment.locale('en');

if (lang === 'en') {
// Just set moment locale
moment.locale('en');
} else {
// Load locale
require(['moment/locale/' + lang + '.js'], function () {
// And then set moment locale
moment.locale(lang);
// Load locale
require(['moment/locale/' + lang + '.js'], function () {
// And then set moment locale
moment.locale(lang.toLowerCase());
}, function() { // if it fails attempt using the 2 letter language code
var shortCode = lang.substr(0,2).toLowerCase();
require(['moment/locale/' + shortCode + '.js'], function () {
moment.locale(shortCode);
});
}
});

// Translating and setting page-title
$rootScope.$emit('setPageTitle', $translate.instant($document[0].title));
Expand Down
14 changes: 14 additions & 0 deletions app/main/posts/views/filter-by-datasource.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ function FilterByDatasourceController($scope, $rootScope, ConfigEndpoint, _, $lo
$scope.providers = _.sortBy($scope.providers, 'label');
}

$scope.currentFocusInLabel = null;

$scope.isChildFocused = function(provider) {
return $scope.currentFocusInLabel === provider.label;
}

$scope.setParentFocusIn = function (provider) {
$scope.currentFocusInLabel = provider.label;
};

$scope.setParentFocusOut = function (provider) {
$scope.currentFocusInLabel = null;
};

function getTotals(source) {
var stats = _.findWhere($scope.postStats, {type: source.toLowerCase()});
if (stats && stats.total) {
Expand Down
6 changes: 4 additions & 2 deletions app/main/posts/views/filter-by-datasource.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@
<div
class="survey-filter-checkbox init"
ng-class="{checked: (filters.source.indexOf(provider.label.toLowerCase()) !== -1)}"
ng-repeat="provider in providers"
ng-repeat="provider in providers track by provider.label"
dropdown
>
<div class="survey-filter-parent">
<div class="survey-filter-label">
<div class="survey-filter-label" ng-class="{'child-focused': isChildFocused(provider)}">
<span class="post-band" ng-style="{backgroundColor: '#00aced'}"></span>
<label>
<input
type="checkbox"
ng-checked="filters.source.indexOf(provider.label.toLowerCase()) !== -1"
translate
ng-click="toggleFilters(provider.label.toLowerCase())"
ng-focus="setParentFocusIn(provider)"
ng-blur="setParentFocusOut(provider)"
/>
{{provider.label}}
</label>
Expand Down
7 changes: 4 additions & 3 deletions app/main/posts/views/filters/filters-dropdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ <h4 class="dropdown-menu-title" translate="app.filter_by"></h4>
<filter-date date-after-model="filters.date_after" date-before-model="filters.date_before"></filter-date>
<filter-location center-point-model="filters.center_point" within-km-model="filters.within_km"></filter-location>
<!-- end: filter options -->
<div class="form-field filter-actions">
<button type="button" class="button-beta" ng-click="clearFilters()" translate>global_filter.restore_defaults</button>
<button type="submit" class="button-alpha" translate>{{getButtonText()}}</button>
</div>
</div>
<div class="form-field filter-actions">
<button type="button" class="button-beta" ng-click="clearFilters()" translate>global_filter.restore_defaults</button>
<button type="submit" class="button-alpha" translate>{{getButtonText()}}</button></div>
Loading

0 comments on commit 150b4cc

Please sign in to comment.