diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 7300f16dce..fef4f26d0b 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -38,52 +38,93 @@ class GroupsController < ApplicationController before_action :find_group, only: %i[destroy show create_memberships destroy_membership edit_membership add_users] + # GET /groups + # GET /groups.xml def index @groups = Group.order(Arel.sql('lastname ASC')) + + respond_to do |format| + format.html # index.html.erb + format.xml { render xml: @groups } + end end + # GET /groups/1 + # GET /groups/1.xml def show - @group_users = group_members - render layout: 'no_menu' + respond_to do |format| + format.html do + @group_users = group_members + render layout: 'no_menu' + end + format.xml { render xml: @group } + end end + # GET /groups/new + # GET /groups/new.xml def new @group = Group.new + + respond_to do |format| + format.html # new.html.erb + format.xml { render xml: @group } + end end + # GET /groups/1/edit def edit @group = Group.includes(:members, :users).find(params[:id]) set_filters_for_user_autocompleter end + # POST /groups + # POST /groups.xml def create @group = Group.new permitted_params.group - if @group.save - flash[:notice] = I18n.t(:notice_successful_create) - redirect_to(groups_path) - else - render action: :new + respond_to do |format| + if @group.save + flash[:notice] = I18n.t(:notice_successful_create) + format.html { redirect_to(groups_path) } + format.xml { render xml: @group, status: :created, location: @group } + else + format.html { render action: :new } + format.xml { render xml: @group.errors, status: :unprocessable_entity } + end end end + # PUT /groups/1 + # PUT /groups/1.xml def update @group = Group.includes(:users).find(params[:id]) - if @group.update(permitted_params.group) - flash[:notice] = I18n.t(:notice_successful_update) - redirect_to action: :index - else - render action: :edit + respond_to do |format| + if @group.update(permitted_params.group) + flash[:notice] = I18n.t(:notice_successful_update) + format.html { redirect_to(groups_path) } + format.xml { head :ok } + else + format.html { render action: 'edit' } + format.xml { render xml: @group.errors, status: :unprocessable_entity } + end end end + # DELETE /groups/1 + # DELETE /groups/1.xml def destroy ::Principals::DeleteJob.perform_later(@group) - flash[:info] = I18n.t(:notice_deletion_scheduled) - redirect_to action: :index + respond_to do |format| + format.html do + flash[:info] = I18n.t(:notice_deletion_scheduled) + redirect_to(action: :index) + end + format.xml { head 202 } + end end def add_users diff --git a/app/models/principals/scopes/ordered_by_name.rb b/app/models/principals/scopes/ordered_by_name.rb index 94c48faac6..97eff3aedc 100644 --- a/app/models/principals/scopes/ordered_by_name.rb +++ b/app/models/principals/scopes/ordered_by_name.rb @@ -61,7 +61,7 @@ module Principals::Scopes 'users.firstname' when :lastname_firstname, :lastname_coma_firstname "concat_ws(' ', users.lastname, users.firstname)" - when :login + when :username "users.login" else raise ArgumentError, "Invalid user format" diff --git a/config/locales/crowdin/js-ar.yml b/config/locales/crowdin/js-ar.yml index e32a7f445d..f6f22c1606 100644 --- a/config/locales/crowdin/js-ar.yml +++ b/config/locales/crowdin/js-ar.yml @@ -845,7 +845,7 @@ ar: automatic: 'Automatic' manually: 'Manually' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Need to see relations in the work package list?' diff --git a/config/locales/crowdin/js-bg.yml b/config/locales/crowdin/js-bg.yml index 15b834cced..747fe5eb19 100644 --- a/config/locales/crowdin/js-bg.yml +++ b/config/locales/crowdin/js-bg.yml @@ -845,7 +845,7 @@ bg: automatic: 'Автоматично' manually: 'Ръчно' warning: 'Ще загубите предишното си сортиране, когато активирате автоматичния режим на сортиране.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Need to see relations in the work package list?' diff --git a/config/locales/crowdin/js-ca.yml b/config/locales/crowdin/js-ca.yml index 01f0bb12e2..d9a438ac0c 100644 --- a/config/locales/crowdin/js-ca.yml +++ b/config/locales/crowdin/js-ca.yml @@ -845,7 +845,7 @@ ca: automatic: 'Automatic' manually: 'Manually' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Need to see relations in the work package list?' diff --git a/config/locales/crowdin/js-cs.yml b/config/locales/crowdin/js-cs.yml index aec9d44cdb..e6c93046a2 100644 --- a/config/locales/crowdin/js-cs.yml +++ b/config/locales/crowdin/js-cs.yml @@ -845,7 +845,7 @@ cs: automatic: 'Automaticky' manually: 'Ručně' warning: 'Při aktivaci režimu automatického řazení ztratíte své předchozí řazení.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Potřebujete určité pracovní balíčky, aby vyšly z celkového objemu?' relation_columns: 'Potřebujete vidět vztahy v seznamu pracovních balíčků?' diff --git a/config/locales/crowdin/js-da.yml b/config/locales/crowdin/js-da.yml index 51ff182122..f40e9e2a36 100644 --- a/config/locales/crowdin/js-da.yml +++ b/config/locales/crowdin/js-da.yml @@ -844,7 +844,7 @@ da: automatic: 'Automatic' manually: 'Manually' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Need to see relations in the work package list?' diff --git a/config/locales/crowdin/js-de.yml b/config/locales/crowdin/js-de.yml index 7579742267..5a81d78124 100644 --- a/config/locales/crowdin/js-de.yml +++ b/config/locales/crowdin/js-de.yml @@ -86,7 +86,7 @@ de: caption_rate_history: "Stundensatz-Historie" clipboard: browser_error: "Ihr Browser unterstützt das Kopieren in die Zwischenablage nicht nativ. Bitte selektieren und kopieren Sie den Text händisch." - copied_successful: "Successfully copied to clipboard!" + copied_successful: "Erfolgreich in die Zwischenablage kopiert!" chart: type: 'Art des Diagramms' axis_criteria: 'Achsen-Kriterien' @@ -844,7 +844,7 @@ de: automatic: 'Automatisch' manually: 'Manuell' warning: 'Sie verlieren Ihre vorherige Sortierung beim Aktivieren des automatischen Sortiermodus.' - columns_help_text: "Verwenden Sie die obige Eingabe, um Spalten zur Tabellenansicht hinzuzufügen. Sie können die Spalten per Drag & Drop verschieben, um sie neu anzuordnen." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Sollen bestimmte Arbeitspakete aus der Menge herausstechen?' relation_columns: 'Möchten Sie Zusammenhänge in der Arbeitspaketliste anzeigen?' diff --git a/config/locales/crowdin/js-el.yml b/config/locales/crowdin/js-el.yml index 8e9797d798..f6eac7abcc 100644 --- a/config/locales/crowdin/js-el.yml +++ b/config/locales/crowdin/js-el.yml @@ -844,7 +844,7 @@ el: automatic: 'Αυτόματα' manually: 'Χειροκίνητα' warning: 'Θα χάσετε την προηγούμενη ταξινόμηση όταν ενεργοποιήσετε την λειτουργία αυτόματης ταξινόμησης.' - columns_help_text: "Χρησιμοποιήστε την παραπάνω είσοδο για να προσθέσετε στήλες στην προβολή του πίνακα σας. Μπορείτε να σύρετε και να αποθέσετε τις στήλες για να τις αναδιατάξετε." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Χρειάζεστε συγκεκριμένα πακέτα εργασίας για να ξεχωρίσετε από την μάζα;' relation_columns: 'Χρειάζεστε να βλέπετε συσχετίσεις στη λίστα πακέτων εργασίας;' diff --git a/config/locales/crowdin/js-es.yml b/config/locales/crowdin/js-es.yml index 8e68005afe..06e9dee3cc 100644 --- a/config/locales/crowdin/js-es.yml +++ b/config/locales/crowdin/js-es.yml @@ -845,7 +845,7 @@ es: automatic: 'Automático' manually: 'Manual' warning: 'Al activar el modo de ordenación automática, se perderá la ordenación actual.' - columns_help_text: "Use los datos anteriores para añadir columnas a la vista de tabla. Puede arrastrar y colocar las columnas para cambiar el orden." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: '¿Necesita que algunos paquetes de trabajo destaquen del resto?' relation_columns: '¿Necesita ver las relaciones en la lista del paquete de trabajo?' diff --git a/config/locales/crowdin/js-fi.yml b/config/locales/crowdin/js-fi.yml index da2cc8a198..b218bc17c1 100644 --- a/config/locales/crowdin/js-fi.yml +++ b/config/locales/crowdin/js-fi.yml @@ -845,7 +845,7 @@ fi: automatic: 'Automaattinen' manually: 'Manuaalinen' warning: 'Automaattinen lajittelutapa korvaa nykyiset asetukset' - columns_help_text: "Käytä yläpuolella olevaa kenttää taulunäkymän sarakkeiden valintaan. Voit järjestää sarakkeita raahaamalla niitä." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Täytyy nähdä riippuvuudet tehtävälistassa?' diff --git a/config/locales/crowdin/js-fil.yml b/config/locales/crowdin/js-fil.yml index c00bf59150..9e043f097d 100644 --- a/config/locales/crowdin/js-fil.yml +++ b/config/locales/crowdin/js-fil.yml @@ -845,7 +845,7 @@ fil: automatic: 'Automatic' manually: 'Manually' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Kailangan tingnan ang mga relasyon sa listahan ng work package?' diff --git a/config/locales/crowdin/js-fr.yml b/config/locales/crowdin/js-fr.yml index 305929a782..94babc971c 100644 --- a/config/locales/crowdin/js-fr.yml +++ b/config/locales/crowdin/js-fr.yml @@ -845,7 +845,7 @@ fr: automatic: 'Automatique' manually: 'Manuellement' warning: 'Vous perdrez votre tri précédent lors de l''activation du mode de tri automatique.' - columns_help_text: "Utilisez l’entrée ci-dessus pour ajouter des colonnes à votre vue tableau. Vous pouvez déplacer les colonnes par glisser/déposer pour les réorganiser." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Vous avez besoin de lots de travaux qui sortent du lot ?' relation_columns: 'Besoin de voir les relations sur la liste des lots de travaux ?' diff --git a/config/locales/crowdin/js-hr.yml b/config/locales/crowdin/js-hr.yml index 8ec3ccb788..8fe8d65515 100644 --- a/config/locales/crowdin/js-hr.yml +++ b/config/locales/crowdin/js-hr.yml @@ -845,7 +845,7 @@ hr: automatic: 'Automatic' manually: 'Manually' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Need to see relations in the work package list?' diff --git a/config/locales/crowdin/js-hu.yml b/config/locales/crowdin/js-hu.yml index d005e64556..e1129ce4b0 100644 --- a/config/locales/crowdin/js-hu.yml +++ b/config/locales/crowdin/js-hu.yml @@ -844,7 +844,7 @@ hu: automatic: 'Automatikus' manually: 'Kézi' warning: 'Az automatikus válogatás üzemmód aktiválásakor elveszíti korábbi rendezését.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Szeretné látni a munkacsomag kapcsolatait?' diff --git a/config/locales/crowdin/js-id.yml b/config/locales/crowdin/js-id.yml index b56ce76382..49acbeac2e 100644 --- a/config/locales/crowdin/js-id.yml +++ b/config/locales/crowdin/js-id.yml @@ -845,7 +845,7 @@ id: automatic: 'Automatic' manually: 'Manually' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Apakah perlu untuk melihat hubungan dalam daftar paker kerja?' diff --git a/config/locales/crowdin/js-it.yml b/config/locales/crowdin/js-it.yml index e120380f2a..1053ed62b8 100644 --- a/config/locales/crowdin/js-it.yml +++ b/config/locales/crowdin/js-it.yml @@ -845,7 +845,7 @@ it: automatic: 'Automatico' manually: 'Manuale' warning: 'Perderai il tuo ordinamento precedente quando attivi la modalità di ordinamento automatico.' - columns_help_text: "Utilizza l'input sopra per aggiungere colonne alla visualizzazione della tabella. È possibile trascinare e rilasciare le colonne per riordinarle." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Vuoi che alcune macro-attività si distinguano dalla massa?' relation_columns: 'Vuoi visualizzare le relazioni nell''elenco di macro-attività?' diff --git a/config/locales/crowdin/js-ko.yml b/config/locales/crowdin/js-ko.yml index 356ec9072c..f460afd8d5 100644 --- a/config/locales/crowdin/js-ko.yml +++ b/config/locales/crowdin/js-ko.yml @@ -845,7 +845,7 @@ ko: automatic: '자동' manually: '수동' warning: '자동 정렬 모드를 활성화하면 이전 정렬이 손실됩니다.' - columns_help_text: "위 입력을 사용하여 테이블 보기에 열을 추가하세요. 열을 끌어다 놓아 순서를 바꿀 수 있습니다." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: '나머지 작업 중에 확연히 두드러지는 특정 작업 패키지가 필요합니까?' relation_columns: '작업 패키지 목록에서 관계를 표시해야 합니까?' diff --git a/config/locales/crowdin/js-lt.yml b/config/locales/crowdin/js-lt.yml index 7ef408d4da..22049ad2f2 100644 --- a/config/locales/crowdin/js-lt.yml +++ b/config/locales/crowdin/js-lt.yml @@ -845,7 +845,7 @@ lt: automatic: 'Automatinis' manually: 'Rankinis' warning: 'Aktyvuojant automatinį rikiavimo režimą jūs prarasite savo ankstesnį rikiavimą.' - columns_help_text: "Aukščiau esančioje įvedimo eilutėje pridėkite stulpelius į lentelės vaizdą. Galite pele perkelti stulpelius, jei reikalinga kita jų tvarka." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Reikia išskirti tam tikrus darbo paketus iš didelės masės?' relation_columns: 'Ar reikia matyti ryšius darbų paketų sąraše?' diff --git a/config/locales/crowdin/js-nl.yml b/config/locales/crowdin/js-nl.yml index ff427a1c13..e30a6da003 100644 --- a/config/locales/crowdin/js-nl.yml +++ b/config/locales/crowdin/js-nl.yml @@ -845,7 +845,7 @@ nl: automatic: 'Automatic' manually: 'Manually' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Moeten bepaalde werkpakketten te onderscheiden zijn van de massa?' relation_columns: 'Nodig om te zien van betrekkingen in de pakketlijst werk?' diff --git a/config/locales/crowdin/js-no.yml b/config/locales/crowdin/js-no.yml index 92ec576d87..28c1cba403 100644 --- a/config/locales/crowdin/js-no.yml +++ b/config/locales/crowdin/js-no.yml @@ -845,7 +845,7 @@ automatic: 'Automatic' manually: 'Manually' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Need to see relations in the work package list?' diff --git a/config/locales/crowdin/js-pl.yml b/config/locales/crowdin/js-pl.yml index 670f792604..d5e4f6bffb 100644 --- a/config/locales/crowdin/js-pl.yml +++ b/config/locales/crowdin/js-pl.yml @@ -845,7 +845,7 @@ pl: automatic: 'Automatycznie' manually: 'Ręcznie' warning: 'Wskutek aktywacji trybu automatycznego sortowania utracisz poprzednie sortowanie.' - columns_help_text: "Użyj powyższych danych wejściowych, aby dodać kolumny do widoku tabeli. Możesz przeciągać i upuszczać kolumny, aby zmienić ich kolejność." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Czy określone pakiety robocze trzeba wyróżnić?' relation_columns: 'Chcesz zobaczyć relacje w tej liście pakietów roboczych?' diff --git a/config/locales/crowdin/js-pt.yml b/config/locales/crowdin/js-pt.yml index f269b70eeb..33cbd1a57d 100644 --- a/config/locales/crowdin/js-pt.yml +++ b/config/locales/crowdin/js-pt.yml @@ -844,7 +844,7 @@ pt: automatic: 'Automático' manually: 'Manualmente' warning: 'Você perderá sua ordenação anterior quando ativar o modo de ordenação automática.' - columns_help_text: "Utilize a entrada acima para adicionar colunas à sua visualização de tabela. Você pode arrastar e soltar as colunas para reorganizá-las." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Precisa de certos pacotes de trabalho para se destacar da massa?' relation_columns: 'Necessário ver as relações na lista de pacote de trabalho?' diff --git a/config/locales/crowdin/js-ro.yml b/config/locales/crowdin/js-ro.yml index 4525f7e22b..22740a553d 100644 --- a/config/locales/crowdin/js-ro.yml +++ b/config/locales/crowdin/js-ro.yml @@ -844,7 +844,7 @@ ro: automatic: 'Automatic' manually: 'Manually' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Need to see relations in the work package list?' diff --git a/config/locales/crowdin/js-ru.yml b/config/locales/crowdin/js-ru.yml index de0da41cd1..9676b9e11e 100644 --- a/config/locales/crowdin/js-ru.yml +++ b/config/locales/crowdin/js-ru.yml @@ -844,7 +844,7 @@ ru: automatic: 'Автоматически' manually: 'Вручную' warning: 'При активации режима автоматического упорядования вы потеряете свою предыдущую сортировку.' - columns_help_text: "С помощью поля ввода выше можно добавлять столбцы в табличное представление. Для изменения порядка столбцов перетаскивайте их мышью." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Хотите выделить некоторые пакеты работ из общей массы?' relation_columns: 'Нужно видеть отношения в списке пакетов работ?' diff --git a/config/locales/crowdin/js-sk.yml b/config/locales/crowdin/js-sk.yml index 517e94795d..3ca178e95b 100644 --- a/config/locales/crowdin/js-sk.yml +++ b/config/locales/crowdin/js-sk.yml @@ -845,7 +845,7 @@ sk: automatic: 'Automatic' manually: 'Manually' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Mali by sa rozlišovať osobitné pracovné balíčky?' relation_columns: 'Potrebujete vidieť vzťahy v zozname pracovných balíčkov?' diff --git a/config/locales/crowdin/js-sl.yml b/config/locales/crowdin/js-sl.yml index 50ebe025a7..d3d0332128 100644 --- a/config/locales/crowdin/js-sl.yml +++ b/config/locales/crowdin/js-sl.yml @@ -844,7 +844,7 @@ sl: automatic: 'Avtomatično' manually: 'Ročno' warning: 'Ko aktivirate način samodejnega razvrščanja, boste izgubili prejšnje razvrščanje.' - columns_help_text: "Uporabite zgornje vnosno polje za dodajanje stolpcev v tabelo. Vrstni red lahko spremenite tako da stolpce povlečete in spustite." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Potrebujete določene delovne pakete da izstopajo iz nereda?' relation_columns: 'Potrebujete videti povezave v seznamu delovnega paketa?' diff --git a/config/locales/crowdin/js-sv.yml b/config/locales/crowdin/js-sv.yml index 9246fe5bf8..57d0a9b038 100644 --- a/config/locales/crowdin/js-sv.yml +++ b/config/locales/crowdin/js-sv.yml @@ -844,7 +844,7 @@ sv: automatic: 'Automatisk' manually: 'Manuellt' warning: 'Du förlorar din tidigare sortering när du aktiverar det automatiska sorteringsläget.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Behöver vissa arbetspaket sticka ut från massan?' relation_columns: 'Behöver du se relationer i listan på arbetspaket?' diff --git a/config/locales/crowdin/js-tr.yml b/config/locales/crowdin/js-tr.yml index a627e8eaf3..9ff4ef199c 100644 --- a/config/locales/crowdin/js-tr.yml +++ b/config/locales/crowdin/js-tr.yml @@ -845,7 +845,7 @@ tr: automatic: 'Otomatik' manually: 'el ile' warning: 'Otomatik sıralama modunu etkinleştirirken önceki sıralamanızı kaybedeceksiniz.' - columns_help_text: "Tablo görünümünüze sütun eklemek için yukarıdaki girişi kullanın. Sütunları yeniden sıralamak için sürükleyip bırakabilirsiniz." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Kitleden sıyrılmak için bazı iş paketlerine mi ihtiyacınız var?' relation_columns: 'İş paketleri listesindeki ilişkileri görmek ister misiniz?' diff --git a/config/locales/crowdin/js-uk.yml b/config/locales/crowdin/js-uk.yml index ca79ce463f..c38c3420d1 100644 --- a/config/locales/crowdin/js-uk.yml +++ b/config/locales/crowdin/js-uk.yml @@ -845,7 +845,7 @@ uk: automatic: 'Автоматично' manually: 'Вручну' warning: 'Ви втратите попереднє сортування при активації автоматичного сортування.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Потрібні певні робочі пакети, щоб виділитися зі скупчення?' relation_columns: 'Потрібно бачити відносини у списку робочих пакетів?' diff --git a/config/locales/crowdin/js-vi.yml b/config/locales/crowdin/js-vi.yml index 76688a873c..045a9a0dc4 100644 --- a/config/locales/crowdin/js-vi.yml +++ b/config/locales/crowdin/js-vi.yml @@ -844,7 +844,7 @@ vi: automatic: 'Automatic' manually: 'Manually' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: 'Need certain work packages to stand out from the mass?' relation_columns: 'Need to see relations in the work package list?' diff --git a/config/locales/crowdin/js-zh-CN.yml b/config/locales/crowdin/js-zh-CN.yml index bb2c98fff6..c936c8ff53 100644 --- a/config/locales/crowdin/js-zh-CN.yml +++ b/config/locales/crowdin/js-zh-CN.yml @@ -845,7 +845,7 @@ zh-CN: automatic: '自动' manually: '手动' warning: '激活自动排序模式时,您将丢失以前的排序结果。' - columns_help_text: "使用上面的输入向表视图添加列。 您可以拖放列来为它们重新排序。" + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: '需要特定的工作包以脱颖而出?' relation_columns: '需要查看工作包列表中的关系吗?' diff --git a/config/locales/crowdin/js-zh-TW.yml b/config/locales/crowdin/js-zh-TW.yml index c2ce9c1c7c..f38b674c30 100644 --- a/config/locales/crowdin/js-zh-TW.yml +++ b/config/locales/crowdin/js-zh-TW.yml @@ -844,7 +844,7 @@ zh-TW: automatic: '自動' manually: '手動' warning: 'You will lose your previous sorting when activating the automatic sorting mode.' - columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them." + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." upsale: attribute_highlighting: '需要某些工作包才能從大眾中脫穎而出?' relation_columns: '需要檢視工作項目清單的關係嗎' diff --git a/docs/installation-and-operations/installation/docker/README.md b/docs/installation-and-operations/installation/docker/README.md index 880a9087b1..7dbbd6d1f1 100644 --- a/docs/installation-and-operations/installation/docker/README.md +++ b/docs/installation-and-operations/installation/docker/README.md @@ -327,6 +327,43 @@ docker run -p 8080:80 --rm -it openproject-with-slack After which you can access OpenProject under http://localhost:8080. +## Offline/air-gapped installation + +It's possible to run the docker image on an a system with no internet access using `docker save` and `docker load`. +The installation works the same as described above. The only difference is that you don't download the image the usual way. + +**1) Save the image** + +On a system that has access to the internet run the following. + +``` +docker pull openproject/community:11 && docker save openproject/community:11 | gzip > openproject-11.tar.gz +``` + +This creates a compressed archive containing the latest OpenProject docker image. +The file will have a size of around 700mb. + +**2) Transfer the file onto the system** + +Copy the file onto the target system by any means that works. +This could be sftp, scp or even via a USB stick in case of a truly air-gapped system. + +**3) Load the image** + +Once the file is on the system you can load it like this: + +``` +gunzip openproject-11.tar.gz && docker load -i openproject-11.tar +``` + +This extracts the archive and loads the contained image layers into docker. +The .tar file can be deleted after this. + +**4) Proceed with the installation** + +After this both installation and later upgrades work just as usual. +You only replaced `docker-compose pull` or the normal, implicit download of the image with the steps described here. + ## Docker Swarm If you need to serve a very large number of users it's time to scale up horizontally. diff --git a/docs/system-admin-guide/authentication/authentication-settings/README.md b/docs/system-admin-guide/authentication/authentication-settings/README.md index 8cfa86b679..5add5d40d5 100644 --- a/docs/system-admin-guide/authentication/authentication-settings/README.md +++ b/docs/system-admin-guide/authentication/authentication-settings/README.md @@ -14,7 +14,7 @@ You can adapt the following under the authentication settings: ## General authentication settings -1. Select if the **authentication is required** to access OpenProject. +1. Select if the **authentication is required** to access OpenProject. **Watch out**: If you un-tick this box your OpenProject instance will be visible to the general public without logging in. The visibility of individual projects depends on [this setting](../../../user-guide/projects/#set-a-project-to-public). 2. Select an option for **self-registration**. Self-registration can either be **disabled**, or it can be allowed with the following criteria: diff --git a/docs/user-guide/projects/README.md b/docs/user-guide/projects/README.md index 42f41c9f76..03881f7baa 100644 --- a/docs/user-guide/projects/README.md +++ b/docs/user-guide/projects/README.md @@ -79,8 +79,6 @@ OpenProject, for example, uses the projects to structure the different modules/p ## Project Settings @@ -121,7 +119,7 @@ Press the blue **Save** button to apply your changes. If you want to set a project to public, you can do so by ticking the box next to "Public" in the [project settings](project-settings) *->Information*. Setting a project to public will make it accessible to all people within your OpenProject instance. -(Should your instance be accessible without authentication [accessible without authentication](../../system-admin-guide/authentication/authentication-settings) this option will make the project visible to the general public outside your users, too) +(Should your instance be [accessible without authentication](../../system-admin-guide/authentication/authentication-settings) this option will make the project visible to the general public outside your registered users, too) ### Create a project template diff --git a/modules/backlogs/config/locales/crowdin/de.yml b/modules/backlogs/config/locales/crowdin/de.yml index 7c6d9b0a0d..784f4ab191 100644 --- a/modules/backlogs/config/locales/crowdin/de.yml +++ b/modules/backlogs/config/locales/crowdin/de.yml @@ -99,7 +99,7 @@ de: backlogs_empty_title: "Für Backlogs sind keine Versionen definiert" backlogs_empty_action_text: "Um mit Backlogs zu beginnen, erstellen Sie eine neue Version und fügen diese einer Backlogs-Spalte hinzu." button_edit_wiki: "Wiki Seite bearbeiten" - error_backlogs_task_cannot_be_story: "The settings are invalid. The selected task type can not also be a story type." + error_backlogs_task_cannot_be_story: "Die Einstellungen sind ungültig. Der gewählte Aufgabentyp kann nicht auch ein Story-Typ sein." error_intro_plural: "Die folgenden Fehler sind aufgetreten:" error_intro_singular: "Der folgende Fehler ist aufgetreten:" error_outro: "Bitte beheben Sie die obigen Fehler bevor Sie erneut abschicken." diff --git a/modules/backlogs/config/locales/crowdin/ja.yml b/modules/backlogs/config/locales/crowdin/ja.yml index 3d50316ac1..9017bb4941 100644 --- a/modules/backlogs/config/locales/crowdin/ja.yml +++ b/modules/backlogs/config/locales/crowdin/ja.yml @@ -33,10 +33,10 @@ ja: work_package: attributes: blocks_ids: - can_only_contain_work_packages_of_current_sprint: "では現在のスプリント内の作業項目IDのみを含めることができます。" + can_only_contain_work_packages_of_current_sprint: "では現在のスプリント内のワークパッケージ ID のみを含めることができます。" must_block_at_least_one_work_package: "は少なくとも 1つのチケットIDを含める必要があります。" parent_id: - parent_child_relationship_across_projects: "は無効です。作業項目'%{work_package_name}'はバックログタスクで、現在のプロジェクト外の親を持つことはできません。" + parent_child_relationship_across_projects: "は無効です。ワークパッケージ '%{work_package_name}' はバックログタスクで、現在のプロジェクト外の親を持つことはできません。" type_must_be_one_of_the_following: "型は次のいずれかである必要があります: %{type_names}" version_id: task_version_must_be_the_same_as_story_version: "親ストーリーのバージョンと同じでなければなりません。" @@ -99,7 +99,7 @@ ja: backlogs_empty_title: "バックログで使用するバージョンは定義されていません" backlogs_empty_action_text: "バックログを開始するには、新しいバージョンを作成しそれをバックログ列に割り当てます。" button_edit_wiki: "Wikiページの編集" - error_backlogs_task_cannot_be_story: "The settings are invalid. The selected task type can not also be a story type." + error_backlogs_task_cannot_be_story: "設定が無効です。選択したタスクのタイプはストーリータイプにはできません。" error_intro_plural: "次のエラーが発生しました:" error_intro_singular: "次のエラーが発生しました:" error_outro: "送信する前に上記のエラーを修正してください。" @@ -115,7 +115,7 @@ ja: label_burndown: "バーンダウン" label_column_in_backlog: "バックログの列" label_hours: "時間" - label_work_package_hierarchy: "作業項目の階層" + label_work_package_hierarchy: "ワークパッケージの階層" label_master_backlog: "マスターバックログ" label_not_prioritized: "優先度が未設定" label_points: "ポイント" @@ -144,7 +144,7 @@ ja: points_to_accept: "未着手ポイント" points_to_resolve: "未解決ポイント" project_module_backlogs: "バックログ" - rb_label_copy_tasks: "作業項目をコピー" + rb_label_copy_tasks: "ワークパッケージをコピー" rb_label_copy_tasks_all: "全て" rb_label_copy_tasks_none: "なし" rb_label_copy_tasks_open: "開く" diff --git a/modules/boards/config/locales/crowdin/js-ja.yml b/modules/boards/config/locales/crowdin/js-ja.yml index a9e51579ef..3c74bf5201 100644 --- a/modules/boards/config/locales/crowdin/js-ja.yml +++ b/modules/boards/config/locales/crowdin/js-ja.yml @@ -26,10 +26,10 @@ ja: new_board: '新しいボード' add_list: 'ボードにリストを追加' add_card: 'カードを追加' - error_attribute_not_writable: "作業項目を移動できません。 %{attribute} は書き込みできません。" + error_attribute_not_writable: "ワークパッケージを移動できません。 %{attribute} は書き込みできません。" error_loading_the_list: "リストの読み込み中にエラーが発生しました: %{error_message}" error_permission_missing: "公開クエリを作成するアクセス許可が見つかりません。" - error_cannot_move_into_self: "作業項目を自身の列に移動することはできません。" + error_cannot_move_into_self: "ワークパッケージを自身の列に移動することはできません。" click_to_remove_list: "クリックしてこのリストを削除" board_type: text: 'ボードの形式' @@ -40,9 +40,9 @@ ja: action: 'アクションボード' action_by_attribute: 'アクションボード (%{attribute})' action_text: > - %{attribute} 属性のリストをフィルタリングしたボード。作業項目を他のリストに移動すると、それらの属性が更新されます。 + %{attribute} 属性のリストをフィルタリングしたボード。ワークパッケージを他のリストに移動すると、それらの属性が更新されます。 action_text_subprojects: > - サブプロジェクトの列が自動化されたボード。作業項目を他のリストにドラッグすると、それに応じて(サブ)プロジェクトが更新されます。 + サブプロジェクトの列が自動化されたボード。ワークパッケージを他のリストにドラッグすると、それに応じて(サブ)プロジェクトが更新されます。 action_text_subtasks: > Board with automated columns for sub-elements. Dragging work packages to other lists updates the parent accordingly. action_text_status: > @@ -71,7 +71,7 @@ ja: status: 新しいリストとして追加するステータスを選択 version: 新しいリストとして追加するバージョンを選択してください subproject: 新しいリストとして追加するサブプロジェクトを選択します - subtasks: 新しいリストとして追加する作業項目を選択 + subtasks: 新しいリストとして追加するワークパッケージを選択 warning: status: | 利用可能な状態ではありません。
diff --git a/modules/budgets/config/locales/crowdin/ja.yml b/modules/budgets/config/locales/crowdin/ja.yml index 63e77475b9..adfc4b7966 100644 --- a/modules/budgets/config/locales/crowdin/ja.yml +++ b/modules/budgets/config/locales/crowdin/ja.yml @@ -30,7 +30,7 @@ ja: description: "説明" spent: "使用済" status: "ステータス" - subject: "題名" + subject: "タイトル" type: "コスト種類" labor_budget: "計画作業員コスト" material_budget: "計画単価" @@ -63,7 +63,7 @@ ja: label_example_placeholder: '例: %{decimal}' label_view_all_budgets: "全ての予算を表示" label_yes: "はい" - notice_budget_conflict: "作業項目は同一プロジェクトである必要があります。" + notice_budget_conflict: "ワークパッケージは同一プロジェクトである必要があります。" notice_no_budgets_available: "予算がありません。" permission_edit_budgets: "予算の編集" permission_view_budgets: "予算の表示" diff --git a/modules/costs/config/locales/crowdin/ja.yml b/modules/costs/config/locales/crowdin/ja.yml index 1b3b8bc167..cf7374555c 100644 --- a/modules/costs/config/locales/crowdin/ja.yml +++ b/modules/costs/config/locales/crowdin/ja.yml @@ -48,7 +48,7 @@ ja: errors: models: work_package: - is_not_a_valid_target_for_cost_entries: "コストを再割り当てるには、作業項目#%{id}は対象外である。" + is_not_a_valid_target_for_cost_entries: "コストを再割り当てるには、ワークパッケージ#%{id}は対象外である。" nullify_is_not_valid_for_cost_entries: "コストエントリをプロジェクトに割り当てることはできません。" attributes: comment: "コメント" @@ -97,8 +97,8 @@ ja: label_group_by_add: "グループ化フィールドを追加" label_hourly_rate: "時給" label_include_deleted: "削除済みを含める" - label_work_package_filter_add: "作業項目フィルタを追加する" - label_kind: "種別" + label_work_package_filter_add: "ワークパッケージフィルタを追加する" + label_kind: "タイプ" label_less_or_equal: "以下" label_log_costs: "単価を記録" label_no: "いいえ" @@ -131,10 +131,10 @@ ja: permission_view_own_time_entries: "自分の使用済み時間の表示" project_module_costs: "時間とコスト" text_assign_time_and_cost_entries_to_project: "報告された時間とコストをプロジェクトに割り当てる" - text_destroy_cost_entries_question: "削除しようとしている作業項目が%{cost_entries} 件報告されました。どうしますか?" + text_destroy_cost_entries_question: "削除しようとしているワークパッケージが%{cost_entries} 件報告されました。どうしますか?" text_destroy_time_and_cost_entries: "報告された時間とコストを削除する" - text_destroy_time_and_cost_entries_question: "%{hours} 時間分、削除しようとしている作業項目が%{cost_entries} 件報告されました。どうしますか?" - text_reassign_time_and_cost_entries: "報告された時間とコストをこの作業項目に再割り当てください。" + text_destroy_time_and_cost_entries_question: "%{hours} 時間分、削除しようとしているワークパッケージが%{cost_entries} 件報告されました。どうしますか?" + text_reassign_time_and_cost_entries: "報告された時間とコストをこのワークパッケージに再割り当てください。" text_warning_hidden_elements: "いくつかのエントリは、集計から除外されている可能性があります。" week: "週間" js: diff --git a/modules/grids/config/locales/crowdin/js-ja.yml b/modules/grids/config/locales/crowdin/js-ja.yml index d0965d1710..23efb9eae8 100644 --- a/modules/grids/config/locales/crowdin/js-ja.yml +++ b/modules/grids/config/locales/crowdin/js-ja.yml @@ -5,7 +5,7 @@ ja: remove: 'ウィジェットを削除' configure: 'ウィジェットの設定' upsale: - text: "作業項目グラフウィジェットなどの一部のウィジェットは、次のみ利用可能です " + text: "ワークパッケージグラフウィジェットなどの一部のウィジェットは、次のみ利用可能です " link: 'エンタープライズ版。' widgets: custom_text: @@ -45,19 +45,19 @@ ja: title: '経過時間(過去7日)' no_results: '過去7日間の時間エントリはありません。' work_packages_accountable: - title: "責任者である作業項目" + title: "責任者であるワークパッケージ" work_packages_assigned: title: '担当しているワークパッケージ' work_packages_created: - title: '自分が作成した作業項目' + title: '自分が作成したワークパッケージ' work_packages_watched: - title: '自分が見た作業項目' + title: '自分が見たワークパッケージ' work_packages_table: - title: '作業項目のテーブル' + title: 'ワークパッケージの一覧' work_packages_graph: - title: '作業項目のグラフ' + title: 'ワークパッケージのグラフ' work_packages_calendar: title: 'カレンダー' work_packages_overview: - title: '作業項目の概要' + title: 'ワークパッケージの概要' placeholder: 'クリックして編集 ...' diff --git a/modules/recaptcha/app/views/recaptcha/request/perform.html.erb b/modules/recaptcha/app/views/recaptcha/request/perform.html.erb index a23c7ed446..2825596ae2 100644 --- a/modules/recaptcha/app/views/recaptcha/request/perform.html.erb +++ b/modules/recaptcha/app/views/recaptcha/request/perform.html.erb @@ -4,13 +4,27 @@ <%= styled_form_tag({ action: :verify }, { :autocomplete => "off", :id => 'submit_captcha' }) do %>

<%= t 'recaptcha.verify_account' %>

<% if recaptcha_settings[:recaptcha_type] == ::OpenProject::Recaptcha::TYPE_V2 %> - - <%= recaptcha_tags nonce: content_security_policy_script_nonce, - callback: 'submitRecaptchaForm', - site_key: recaptcha_settings[:website_key] %> + <% input_name = "g-recaptcha-response" %> + + <%= recaptcha_tags( + nonce: content_security_policy_script_nonce, + callback: 'submitRecaptchaForm', + site_key: recaptcha_settings[:website_key] + ) %> + <%= nonced_javascript_tag do %> function submitRecaptchaForm(val) { - document.getElementById('g-recaptcha-response').value = val; + var input = document.getElementById('<%= input_name %>'); + + if (!input) { // hcaptcha uses name, not ID + var inputs = document.getElementsByName('<%= input_name %>'); + + if (inputs.length > 0) { + input = inputs[0]; + } + } + + input.value = val; document.getElementById('submit_captcha').submit(); } <% end %> diff --git a/modules/recaptcha/config/initializers/recaptcha.rb b/modules/recaptcha/config/initializers/recaptcha.rb new file mode 100644 index 0000000000..82ee22eb84 --- /dev/null +++ b/modules/recaptcha/config/initializers/recaptcha.rb @@ -0,0 +1,16 @@ +Recaptcha.configure do |config| + # site_key and secret_key are defined via ENV already (RECAPTCHA_SITE_KEY, RECAPTCHA_SECRET_KEY) + + config.verify_url = OpenProject::Recaptcha.verify_url_override || config.verify_url + config.api_server_url = OpenProject::Recaptcha.api_server_url_override || config.api_server_url +end + +module RecaptchaLimitOverride + def invalid_response?(resp) + return super unless OpenProject::Recaptcha::use_hcaptcha? + + resp.empty? || resp.length > ::OpenProject::Recaptcha.hcaptcha_response_limit + end +end + +Recaptcha.singleton_class.prepend RecaptchaLimitOverride diff --git a/modules/recaptcha/lib/open_project/recaptcha.rb b/modules/recaptcha/lib/open_project/recaptcha.rb index 8d6e3f12ec..69b44c4691 100644 --- a/modules/recaptcha/lib/open_project/recaptcha.rb +++ b/modules/recaptcha/lib/open_project/recaptcha.rb @@ -5,5 +5,8 @@ module OpenProject TYPE_V3 ||= 'v3' require "open_project/recaptcha/engine" + require "open_project/recaptcha/configuration" + + extend Configuration end end diff --git a/modules/recaptcha/lib/open_project/recaptcha/configuration.rb b/modules/recaptcha/lib/open_project/recaptcha/configuration.rb new file mode 100644 index 0000000000..94cfede823 --- /dev/null +++ b/modules/recaptcha/lib/open_project/recaptcha/configuration.rb @@ -0,0 +1,31 @@ +module OpenProject + module Recaptcha + module Configuration + extend self + + def use_hcaptcha? + OpenProject::Configuration['recaptcha_via_hcaptcha'] + end + + def hcaptcha_response_limit + @hcaptcha_response_limit ||= (ENV["RECAPTCHA_RESPONSE_LIMIT"].presence || 5000).to_i + end + + def api_server_url_override + ENV["RECAPTCHA_API_SERVER_URL"].presence || ((use_hcaptcha? || nil) && hcaptcha_api_server_url) + end + + def verify_url_override + ENV["RECAPTCHA_VERIFY_URL"].presence || ((use_hcaptcha? || nil) && hcaptcha_verify_url) + end + + def hcaptcha_verify_url + "https://hcaptcha.com/siteverify" + end + + def hcaptcha_api_server_url + "https://hcaptcha.com/1/api.js" + end + end + end +end diff --git a/modules/recaptcha/lib/open_project/recaptcha/engine.rb b/modules/recaptcha/lib/open_project/recaptcha/engine.rb index 639c10caf2..5f4bca6017 100644 --- a/modules/recaptcha/lib/open_project/recaptcha/engine.rb +++ b/modules/recaptcha/lib/open_project/recaptcha/engine.rb @@ -23,17 +23,29 @@ module OpenProject::Recaptcha end config.after_initialize do - SecureHeaders::Configuration.named_append(:recaptcha) do |_request| - { frame_src: %w(https://www.google.com/recaptcha/) } + SecureHeaders::Configuration.named_append(:recaptcha) do |request| + if OpenProject::Recaptcha.use_hcaptcha? + value = %w(https://*.hcaptcha.com) + keys = %i(frame_src script_src style_src connect_src) + + keys.index_with value + else + { + frame_src: %w(https://www.google.com/recaptcha/) + } + end end - OpenProject::Authentication::Stage.register(:recaptcha, - nil, - run_after_activation: true, - active: -> { - type = Setting.plugin_openproject_recaptcha[:recaptcha_type] - type.present? && type.to_s != ::OpenProject::Recaptcha::TYPE_DISABLED - }) do + OpenProject::Authentication::Stage.register( + :recaptcha, + nil, + run_after_activation: true, + active: -> { + type = Setting.plugin_openproject_recaptcha[:recaptcha_type] + + type.present? && type.to_s != ::OpenProject::Recaptcha::TYPE_DISABLED + } + ) do recaptcha_request_path end end diff --git a/modules/reporting/config/locales/crowdin/ja.yml b/modules/reporting/config/locales/crowdin/ja.yml index 1abc3104d4..b8bc206dc6 100644 --- a/modules/reporting/config/locales/crowdin/ja.yml +++ b/modules/reporting/config/locales/crowdin/ja.yml @@ -42,7 +42,7 @@ ja: label_greater: ">" label_is_not_project_with_subprojects: "ではない (子プロジェクトを含む)" label_is_project_with_subprojects: "は(サブプロジェクトを含む)" - label_work_package_attributes: "作業項目の属性" + label_work_package_attributes: "ワークパッケージの属性" label_less: "<" label_money: "金額" label_month_reporting: "月 (経過)" diff --git a/modules/xls_export/config/locales/crowdin/ja.yml b/modules/xls_export/config/locales/crowdin/ja.yml index a0b6617891..642bc568ee 100644 --- a/modules/xls_export/config/locales/crowdin/ja.yml +++ b/modules/xls_export/config/locales/crowdin/ja.yml @@ -6,8 +6,8 @@ ja: export: format: xls: "XLS" - xls_with_descriptions: "説明付きXLS" + xls_with_descriptions: "説明付きの XLS" xls_with_relations: "関係を含むXLS" xls_export: - child_of: 次の子供 + child_of: 次の子 parent_of: 次の親 diff --git a/script/github_pr_errors b/script/github_pr_errors index 5b2cf91df3..dc5a1f6d72 100755 --- a/script/github_pr_errors +++ b/script/github_pr_errors @@ -37,13 +37,7 @@ rescue => e warn "Failed to perform API request #{url}: #{e} #{e.message}" end -response = get_http "pulls?state=open&head=opf:#{branch_name}" -raise "No PR found" if response.empty? -raise "More than one PR found??" if response.count > 1 - -pr_number = response.first['number'] - -warn "Looking for PR #{pr_number}" +warn "Looking for the last action in branch #{branch_name}" response = get_http "actions/runs?branch=#{CGI.escape(branch_name)}" @@ -53,7 +47,7 @@ last_test_action = .select { |entry| entry['name'] == 'Core/Test' } .max_by { |entry| entry['run_number'] } -raise "No action run found for PR #{pr_number}" unless last_test_action +raise "No action run found for branch #{branch_name}" unless last_test_action log_response = get_http last_test_action['logs_url'], json: false errors = [] diff --git a/spec/models/principals/scopes/ordered_by_name_spec.rb b/spec/models/principals/scopes/ordered_by_name_spec.rb index b960154472..490207d7d9 100644 --- a/spec/models/principals/scopes/ordered_by_name_spec.rb +++ b/spec/models/principals/scopes/ordered_by_name_spec.rb @@ -38,10 +38,10 @@ describe Principals::Scopes::OrderedByName, type: :model do shared_let(:group) { FactoryBot.create(:group, groupname: 'Core Team') } shared_let(:placeholder_user) { FactoryBot.create(:placeholder_user, name: 'Developers') } - let(:descending) { false } - subject { Principal.ordered_by_name(desc: descending).pluck(:id) } + let(:descending) { false } + shared_examples 'sorted results' do it 'returns the correct ascending sort' do expect(subject).to eq order @@ -49,37 +49,38 @@ describe Principals::Scopes::OrderedByName, type: :model do context 'reversed' do let(:descending) { true } + it 'returns the correct descending sort' do expect(subject).to eq order.reverse end end end - context 'with default user sort', with_settings: {user_format: :firstname_lastname} do + context 'with default user sort', with_settings: { user_format: :firstname_lastname } do it_behaves_like 'sorted results' do let(:order) { [alice.id, group.id, placeholder_user.id, eve.id] } end end - context 'with lastname_firstname user sort', with_settings: {user_format: :lastname_firstname} do + context 'with lastname_firstname user sort', with_settings: { user_format: :lastname_firstname } do it_behaves_like 'sorted results' do let(:order) { [eve.id, group.id, placeholder_user.id, alice.id] } end end - context 'with lastname_coma_firstname user sort', with_settings: {user_format: :lastname_coma_firstname} do + context 'with lastname_coma_firstname user sort', with_settings: { user_format: :lastname_coma_firstname } do it_behaves_like 'sorted results' do let(:order) { [eve.id, group.id, placeholder_user.id, alice.id] } end end - context 'with firstname user sort', with_settings: {user_format: :firstname} do + context 'with firstname user sort', with_settings: { user_format: :firstname } do it_behaves_like 'sorted results' do let(:order) { [alice.id, group.id, placeholder_user.id, eve.id] } end end - context 'with login user sort', with_settings: {user_format: :login} do + context 'with login user sort', with_settings: { user_format: :username } do it_behaves_like 'sorted results' do let(:order) { [alice.id, group.id, placeholder_user.id, eve.id] } end