if user&.active?
can [:comment, :close, :reopen], Note
- can [:create, :show, :update, :destroy, :data], Trace
+ can [:create, :show, :update, :destroy], Trace
can [:details, :gpx_files], User
can [:index, :show, :update, :update_all, :destroy], UserPreference
body {
font-size: $typeheight;
+ --dark-mode-map-filter: brightness(.8);
}
time[title] {
}
@include color-mode(dark) {
- .leaflet-tile-container .leaflet-tile,
- .mapkey-table-entry td:first-child > * {
- filter: brightness(.8);
- }
-
.leaflet-container .leaflet-control-attribution a {
color: var(--bs-link-color);
}
}
}
+@mixin dark-map-color-scheme {
+ .leaflet-tile-container,
+ .mapkey-table-entry td:first-child > * {
+ filter: var(--dark-mode-map-filter);
+ }
+
+ .leaflet-tile-container .leaflet-tile {
+ filter: none;
+ }
+}
+
+body[data-map-theme="dark"] {
+ @include dark-map-color-scheme;
+}
+
+@include color-mode(dark) {
+ body:not([data-map-theme]) {
+ @include dark-map-color-scheme;
+ }
+}
+
/* Rules for attribution text under the main map shown on printouts */
.donate-attr { color: darken($green, 10%) !important; }
$list-group-hover-bg: rgba(var(--bs-emphasis-color-rgb), .075);
$enable-negative-margins: true;
-$color-mode-type: media-query;
--- /dev/null
+@use "common" with (
+ $color-mode-type: media-query
+);
--- /dev/null
+@use "common" with (
+ $color-mode-type: media-query
+);
+++ /dev/null
-@import "common";
--- /dev/null
+@use "common" with (
+ $color-mode-type: data
+);
--- /dev/null
+@use "common" with (
+ $color-mode-type: data
+);
+++ /dev/null
-@import "common";
--- /dev/null
+module Api
+ module Traces
+ class DataController < ApiController
+ before_action :set_locale
+ before_action :authorize
+
+ authorize_resource :trace
+
+ before_action :offline_error
+
+ def show
+ trace = Trace.visible.find(params[:trace_id])
+
+ if trace.public? || trace.user == current_user
+ if request.format == Mime[:xml]
+ send_data(trace.xml_file.read, :filename => "#{trace.id}.xml", :type => request.format.to_s, :disposition => "attachment")
+ elsif request.format == Mime[:gpx]
+ send_data(trace.xml_file.read, :filename => "#{trace.id}.gpx", :type => request.format.to_s, :disposition => "attachment")
+ elsif trace.file.attached?
+ redirect_to rails_blob_path(trace.file, :disposition => "attachment")
+ else
+ send_file(trace.trace_name, :filename => "#{trace.id}#{trace.extension_name}", :type => trace.mime_type, :disposition => "attachment")
+ end
+ else
+ head :forbidden
+ end
+ end
+
+ private
+
+ def offline_error
+ report_error "GPX files offline for maintenance", :service_unavailable if Settings.status == "gpx_offline"
+ end
+ end
+ end
+end
authorize_resource
- before_action :offline_error, :only => [:create, :destroy, :data]
+ before_action :offline_error, :only => [:create, :destroy]
skip_around_action :api_call_timeout, :only => :create
def show
end
end
- def data
- trace = Trace.visible.find(params[:id])
-
- if trace.public? || trace.user == current_user
- if request.format == Mime[:xml]
- send_data(trace.xml_file.read, :filename => "#{trace.id}.xml", :type => request.format.to_s, :disposition => "attachment")
- elsif request.format == Mime[:gpx]
- send_data(trace.xml_file.read, :filename => "#{trace.id}.gpx", :type => request.format.to_s, :disposition => "attachment")
- elsif trace.file.attached?
- redirect_to rails_blob_path(trace.file, :disposition => "attachment")
- else
- send_file(trace.trace_name, :filename => "#{trace.id}#{trace.extension_name}", :type => trace.mime_type, :disposition => "attachment")
- end
- else
- head :forbidden
- end
- end
-
private
def do_create(file, tags, description, visibility)
end
end
- helper_method :preferred_editor
+ def preferred_color_scheme(subject)
+ if current_user
+ current_user.preferences.find_by(:k => "#{subject}.color_scheme")&.v || "auto"
+ else
+ "auto"
+ end
+ end
+
+ helper_method :preferred_editor, :preferred_color_scheme
def update_totp
if Settings.key?(:totp_key)
else
params[:user][:preferred_editor]
end
- if current_user.save
+
+ success = current_user.save
+
+ if params[:site_color_scheme]
+ site_color_scheme_preference = current_user.preferences.find_or_create_by(:k => "site.color_scheme")
+ success &= site_color_scheme_preference.update(:v => params[:site_color_scheme])
+ end
+
+ if params[:map_color_scheme]
+ map_color_scheme_preference = current_user.preferences.find_or_create_by(:k => "map.color_scheme")
+ success &= map_color_scheme_preference.update(:v => params[:map_color_scheme])
+ end
+
+ if success
# Use a partial so that it is rendered during the next page load in the correct language.
flash[:notice] = { :partial => "preferences/update_success_flash" }
redirect_to preferences_path
<%= javascript_include_tag "turbo", :type => "module" %>
<%= javascript_include_tag "application" %>
<%= javascript_include_tag "i18n/#{I18n.locale}" %>
- <%= stylesheet_link_tag "screen-#{dir}", :media => "screen" %>
+ <% if preferred_color_scheme(:site) == "auto" %>
+ <%= stylesheet_link_tag "screen-auto-#{dir}", :media => "screen" %>
+ <% else %>
+ <%= stylesheet_link_tag "screen-manual-#{dir}", :media => "screen" %>
+ <% end %>
<%= stylesheet_link_tag "print-#{dir}", :media => "print" %>
<%= stylesheet_link_tag "leaflet-all", :media => "screen, print" %>
<%= render :partial => "layouts/meta" %>
<!DOCTYPE html>
-<html lang="<%= I18n.locale %>" dir="<%= dir %>">
+<%= tag.html :lang => I18n.locale,
+ :dir => dir,
+ :data => { :bs_theme => (preferred_color_scheme(:site) if preferred_color_scheme(:site) != "auto") } do %>
<%= render :partial => "layouts/head" %>
- <body class="<%= body_class %>">
+ <%= tag.body :class => body_class,
+ :data => { :map_theme => (preferred_color_scheme(:map) if preferred_color_scheme(:map) != "auto") } do %>
<%= render :partial => "layouts/header" %>
<%= render :partial => "layouts/content" %>
<% if defined?(Settings.matomo) -%>
<noscript><p><img src="<%= request.protocol %><%= Settings.matomo["location"] %>/matomo.php?idsite=<%= Settings.matomo["site"] %>" class="matomo" alt="" /></p></noscript>
<% end -%>
- </body>
-</html>
+ <% end %>
+<% end %>
<%= f.text_field :languages %>
+ <div class="mb-3">
+ <%= label_tag "site_color_scheme", t("preferences.show.preferred_site_color_scheme"), :class => "form-label" %>
+ <%= select_tag "site_color_scheme",
+ options_for_select(%w[auto light dark].map { |scheme| [t("preferences.show.site_color_schemes.#{scheme}"), scheme] },
+ preferred_color_scheme(:site)),
+ :class => "form-select" %>
+ </div>
+
+ <div class="mb-3">
+ <%= label_tag "map_color_scheme", t("preferences.show.preferred_map_color_scheme"), :class => "form-label" %>
+ <%= select_tag "map_color_scheme",
+ options_for_select(%w[auto light dark].map { |scheme| [t("preferences.show.map_color_schemes.#{scheme}"), scheme] },
+ preferred_color_scheme(:map)),
+ :class => "form-select" %>
+ </div>
+
<%= f.primary t(".save") %>
<%= link_to t(".cancel"), preferences_path, :class => "btn btn-link" %>
<% end %>
<li><%= locale %></li>
<% end %>
</ul>
+ </dd>
+ <dt class="col-sm-4"><%= t ".preferred_site_color_scheme" %></dt>
+ <dd class="col-sm-8">
+ <%= t ".site_color_schemes.#{preferred_color_scheme(:site)}" %>
+ </dd>
+
+ <dt class="col-sm-4"><%= t ".preferred_map_color_scheme" %></dt>
+ <dd class="col-sm-8">
+ <%= t ".map_color_schemes.#{preferred_color_scheme(:map)}" %>
</dd>
</dl>
other: '%{count} verslae'
reported_item: Gerapporteerde item
show:
- title: '%{status} Probleem #%{issue_id}'
report_created_at_html: Eerste vermelding op %{datetime}
last_resolved_at_html: Laas geregmaak op %{datetime}
last_updated_at_html: Laaste opgedateer op %{datetime} deur %{displayname}
reason: 'Rede agter die versperring:'
revoker: 'Herroep deur:'
block:
- not_revoked: (nie herroep nie)
show: Wys
edit: Redigeer
page:
creator_name: Skepper
reason: Rede vir die versperring
status: Status
- revoker_name: Herroep deur
notes:
index:
heading: Notas van %{user}
reason: 'Arsyeja për bllok:'
revoker: 'Revoker:'
block:
- not_revoked: (Jo revokuar)
show: Tregoj
edit: Redaktoj
page:
creator_name: Krijuesi
reason: Arsyeja për bllok
status: Statusi
- revoker_name: Revokuar nga ana
notes:
notes_paging_nav:
showing_page: Tu e shfaq faqen %{page}
# Author: McDutchie
# Author: Meno25
# Author: Mido
+# Author: Mohammed Qays
# Author: Mohammed Qubati
# Author: Mutarjem horr
# Author: NEHAOUA
message: الرسالة
node: عقدة
node_tag: وسم عقدة
+ note: ملاحظة
old_node: عقدة قديمة
old_node_tag: وسم عقدة قديمة
old_relation: علاقة قديمة
way: طريق
relation: علاقة
containing_relation:
- entry_role_html: العلاقة %{relation_name} (كــ%{relation_role})
+ entry_role_html: '%{relation_name} (مثل %{relation_role})'
not_found:
title: لم يتم العثور عليه
sorry: 'عفوًا، تعذر العثور على %{type} #%{id}.'
other: '%{count} بلاغ'
reported_item: شيء تم الابلاغ عنه
show:
- title: '%{status} المشكلة #%{issue_id}'
reports:
zero: صفر تقرير
one: تقرير واحد
reason: 'سبب العرقلة:'
revoker: 'المبطل:'
block:
- not_revoked: (لم تلغ)
show: اعرض
edit: تعديل
page:
creator_name: المنشئ
reason: السبب العرقلة
status: الحالة
- revoker_name: مُبطل بواسطة
user_mutes:
index:
title: المستخدمون الممنوعون
way: طريق
relation: علاقة
containing_relation:
- entry_role_html: العلاقه %{relation_name} (كــ %{relation_role})
+ entry_role_html: '%{relation_name} (كــ %{relation_role})'
not_found:
sorry: عفوًا، لم يتم العثور على %{type} بالمعرّف %{id}.
type:
reason: 'سبب العرقلة:'
revoker: 'المبطل:'
block:
- not_revoked: (لم تلغ)
show: اعرض
edit: عدّل
page:
creator_name: المنشئ
reason: السبب للعرقلة
status: الحالة
- revoker_name: مُبطل بواسطة
notes:
notes_paging_nav:
showing_page: الصفحه %{page}
other: '%{count} Informes'
reported_item: Elementu reportáu
show:
- title: '%{status} Problema #%{issue_id}'
reports:
zero: Nun hai informes
one: 1 informe
reason: 'Motivu del bloquéu:'
revoker: 'Desaniciador:'
block:
- not_revoked: (non desaniciáu)
show: Amosar
edit: Editar
page:
creator_name: Creador
reason: Motivu del bloquéu
status: Estáu
- revoker_name: Desaniciáu por
notes:
index:
title: Notes unviaes o comentaes por %{user}
title: '%{block_on}, %{block_by} tərəfindən blok edilib'
status: Status
block:
- not_revoked: (ləgv edilməyib)
show: Göstər
edit: Redaktə et
page:
creator_name: Yaradıcı
reason: Bloklanma səbəbi
status: Status
- revoker_name: Tərəfindən ləgv edilib
notes:
show:
description: Təsvir
open: Асыҡ
resolved: Хәл ителде
show:
- title: '%{status} Мәсьәлә #%{issue_id}'
reports:
one: '%{count} хәбәр'
other: '%{count} хәбәрҙәр'
reason: 'Прычына блякаваньня:'
revoker: 'Адклікаўшы:'
block:
- not_revoked: (не адкліканае)
show: Паказаць
edit: Рэдагаваць
page:
creator_name: Стваральнік
reason: Прычына блякаваньня
status: Статус
- revoker_name: Адкліканае
notes:
show:
title: 'Нататка: %{id}'
other: '%{count} скаргі(-аў)'
reported_item: Скарга
show:
- title: '%{status} Праблема #%{issue_id}'
reports:
one: '%{count} скарга'
few: '%{count} скаргі'
reason: 'Прычына блакіроўкі:'
revoker: 'Адклікаўшы:'
block:
- not_revoked: (не адкліканы)
show: Паказаць
edit: Рэдагаваць
page:
creator_name: Стваральнік
reason: Прычына блакіроўкі
status: Статус
- revoker_name: Адкліканы
user_mutes:
index:
table:
other: '%{count} доклада'
reported_item: Докладван елемент
show:
- title: '%{status} Проблем #%{issue_id}'
reports:
one: '%{count} доклад'
other: '%{count} доклада'
open: Digor
resolved: Diskoulmet
show:
- title: '%{status} Kudenn #%{issue_id}'
reports:
one: 1 danevell
two: 2 zanevell
reason: 'Abeg ar stankadur :'
revoker: 'Torrer :'
block:
- not_revoked: (n'eo ket torret)
show: Diskouez
edit: Aozañ
page:
creator_name: Krouer
reason: Abeg evit stankañ
status: Statud
- revoker_name: Torret gant
navigation:
all_blocks: An holl stankadurioù
blocks_on_me: Stankadurioù evidon
reason: Razlog za blokadu
revoker: 'Opozivalac:'
block:
- not_revoked: (nije opozvano)
show: Pokazati
edit: Urediti
page:
creator_name: Kreator
reason: Razlog za blokadu
status: Stanje
- revoker_name: Opozvano od strane
notes:
index:
id: Id
other: '%{count} Informes'
reported_item: Element denunciat
show:
- title: '%{status} Incidència #%{issue_id}'
reports:
one: '%{count} informe'
other: '%{count} informes'
reason: 'Motiu del blocatge:'
revoker: 'Revoker:'
block:
- not_revoked: (no revocat)
show: Mostra
edit: Edita
page:
creator_name: Creador
reason: Motiu del blocatge
status: Estat
- revoker_name: Revocat per
navigation:
all_blocks: Tots els bloquejos
blocks_on_me: Bloquejos a mi
open: Йиллина
resolved: Кечйина
show:
- title: '%{status} проблема #%{issue_id}'
reports:
one: '%{count} хаам'
other: '%{count} хаамаш'
reason: 'Блоктохаран бахьана:'
revoker: 'БлокдӀайаьккхинарг:'
block:
- not_revoked: (блок дIа ца йаьккхина)
show: Гайта
edit: Нисйан
page:
creator_name: Автор
reason: Блоктохаран бахьана
status: Статус
- revoker_name: ДӀайаьккхина блок
navigation:
all_blocks: Ерриге а блокаш
blocks_on_me: Сан блоктохарш
message: Zpráva
node: Uzel
node_tag: Tag uzlu
+ note: Poznámka
old_node: Starý uzel
old_node_tag: Tag starého uzlu
old_relation: Stará relace
open: Otevřeno
resolved: Vyřešeno
show:
- title: '%{status} Problém #%{issue_id}'
reports:
one: '%{count} hlášení'
few: '%{count} hlášení'
reason: 'Důvod bloku:'
revoker: 'Zrušil:'
block:
- not_revoked: (nezrušeno)
show: Zobrazit
edit: Upravit
page:
creator_name: Autor
reason: Důvod pro blok
status: Stav
- revoker_name: Zrušil
navigation:
all_blocks: Všechny bloky
blocks_on_me: Moje zablokování
open: Agored
resolved: Wedi datrys
show:
- title: '%{status} Gwall #%{issue_id}'
reports:
zero: '%{count} adroddiad'
one: '%{count} adroddiad'
reason: 'Rheswm dros y bloc:'
revoker: 'Dad-flociwr:'
block:
- not_revoked: (heb ei ddirymu)
show: Dangos
edit: Golygu
page:
creator_name: Crëwr
reason: Rheswm dros flocio
status: Statws
- revoker_name: Dirymwyd gan
navigation:
all_blocks: Pob Bloc
blocks_on_me: Blociau arnaf i
diary_comment: Blogkommentar
diary_entry: Blogindlæg
friend: Ven
- issue: Problem
+ issue: Sag
language: Sprog
message: Meddelelse
node: Punkt
node_tag: Punktegenskab
+ note: Bemærkning
old_node: Tidligere punkt
old_node_tag: Tidligere punktegenskab
old_relation: Tidligere relation
more_results: Flere resultater
issues:
index:
- title: Problemer
+ title: Sager
select_status: Vælg status
select_type: Vælg type
select_last_updated_by: Vælg sidst opdateret af
search_guidance: 'Søgning blandt sager:'
states:
ignored: Ignoréret
- open: Åbn
+ open: Åben
resolved: Løst
page:
user_not_found: Brugeren findes ikke
open: Åben
resolved: Løst
show:
- title: '%{status} Sag #%{issue_id}'
+ title:
+ open: Åben sag %{issue_id}
+ ignored: 'Ignoreret sag #%{issue_id}'
+ resolved: Løst sag %{issue_id}
reports:
one: '%{count} rapport'
other: '%{count} rapporter'
edit: Redigér
history: Historik
export: Eksportér
- issues: Problemer
+ issues: Sager
gps_traces: GPS-spor
user_diaries: Brugerblogs
edit_with: Redigér med %{editor}
title: Mine præferencer
preferred_editor: Foretrukken editor
preferred_languages: Foretrukne sprog
+ preferred_site_color_scheme: Foretrukket farvetema for webside
+ site_color_schemes:
+ auto: Auto
+ light: Lyst
+ dark: Mørkt
+ preferred_map_color_scheme: Foretrukket farvetema for kort
+ map_color_schemes:
+ auto: Auto
+ light: Lyst
+ dark: Mørkt
edit_preferences: Rediger præferencer
edit:
title: Rediger præferencer
older: Ældre indlæg
newer: Nyere indlæg
issues:
- older: Ældre problemer
- newer: Nyere problemer
+ older: Ældre sager
+ newer: Nyere sager
traces:
older: Ældre spor
newer: Nyere spor
years:
one: '%{count} år'
other: '%{count} år'
+ short:
+ ended: ophørt
+ revoked_html: ophævet af %{name}
+ active: aktiv
+ active_unread: aktiv ulæst
+ expired_unread: udløbet ulæst
+ read_html: læst %{time}
+ time_in_future_title: '%{time_absolute}; om %{time_relative}'
+ time_in_past_title: '%{time_absolute}; %{time_relative}'
blocks_on:
title: Blokeringer af %{name}
heading_html: Liste over blokeringer af %{name}
reason: 'Årsag til blokering:'
revoker: 'Tilbagekalder:'
block:
- not_revoked: (ikke tilbagekaldt)
show: Vis
edit: Redigér
page:
display_name: Blokkeret bruger
creator_name: Oprettet af
reason: Årsag til blokering
+ start: Start
+ end: Slut
status: Status
- revoker_name: Tilbagekaldt af
navigation:
all_blocks: Alle blokeringer
blocks_on_me: Blokeringer af mig
# Author: Milet
# Author: Mormegil
# Author: Nadjita
+# Author: Nielkrokodil
# Author: Onefloid
# Author: P24
# Author: Pczaja
open: Offen
resolved: Erledigt
show:
- title: '%{status} Problem Nr. %{issue_id}'
reports:
one: Eine Meldung
other: '%{count} Meldungen'
tunnel: Gestrichelter Rand = Tunnel
bridge: Schwarzer Rand = Brücke
private: Privater Zugang
- destination: Nur für Anrainer
+ destination: Nur Zufahrt gestattet
construction: Straßen im Bau
bus_stop: Bushaltestelle
bicycle_shop: Fahrradladen
reason: 'Grund der Sperre:'
revoker: 'Aufgehoben von:'
block:
- not_revoked: (nicht aufgehoben)
show: Anzeigen
edit: Bearbeiten
page:
creator_name: Urheber
reason: Grund der Sperre
status: Status
- revoker_name: Aufgehoben von
navigation:
all_blocks: Alle Sperren
blocks_on_me: Meine Sperren
edit: Bıvurne
revoker: 'Terkner:'
block:
- not_revoked: (nê terkiyayo)
show: Bımocne
edit: Bıvurne
page:
display_name: Karberê kılitbiyayey
creator_name: Vıraştoğ
status: Weziyet
- revoker_name: Terknoğ
notes:
index:
description: Şınasnayış
reason: 'Pśicyna za blokěrowanje:'
revoker: 'Anulěrowaŕ:'
block:
- not_revoked: (nic wótpórany)
show: Pokazaś
edit: Wobźěłaś
page:
creator_name: Blokěrowaŕ
reason: Pśicyna za blokěrowanje
status: Status
- revoker_name: Wótpórany wót
notes:
index:
title: Pokazki, kótarež su se wót %{user} dali abo komentěrowali
message: Μήνυμα
node: Κόμβος
node_tag: Ετικέτα κόμβου
+ note: Σημείωση
old_node: Παλαιός κόμβος
old_node_tag: Παλαιά ετικέτα κόμβου
old_relation: Παλαιά σχέση
way: Γραμμή
relation: Σχέση
containing_relation:
- entry_role_html: Σχέση %{relation_name} (ως %{relation_role})
+ entry_role_html: '%{relation_name} (ως %{relation_role})'
not_found:
title: Δεν βρέθηκε
sorry: 'Λυπάμαι, το %{type} #%{id} δεν βρέθηκε.'
open: Ανοιχτό
resolved: Επιλυμένο
show:
- title: '%{status} Ζήτημα #%{issue_id}'
+ title:
+ open: 'Ανοιχτό ζήτημα #%{issue_id}'
+ ignored: 'Αγνοημένο ζήτημα #%{issue_id}'
+ resolved: 'Επιλυμένο ζήτημα #%{issue_id}'
reports:
one: '%{count} αναφορά'
other: '%{count} αναφορές'
reason: 'Αιτία φραγής:'
revoker: 'Έκανε την ανάκληση:'
block:
- not_revoked: (δεν έχει ανακληθεί)
show: Εμφάνιση
edit: Επεξεργασία
page:
creator_name: Δημιουργός
reason: Αιτία φραγής
status: Κατάσταση
- revoker_name: Ανακλήθηκε από
navigation:
all_blocks: Όλες οι φραγές
blocks_on_me: Φραγές σε μένα
reason: 'Reason for block:'
revoker: 'Revoker:'
block:
- not_revoked: (not revoked)
show: Show
edit: Edit
page:
creator_name: Creator
reason: Reason for block
status: Status
- revoker_name: Revoked by
notes:
index:
title: Notes submitted or commented on by %{user}
title: My Preferences
preferred_editor: Preferred Editor
preferred_languages: Preferred Languages
+ preferred_site_color_scheme: Preferred Website Color Scheme
+ site_color_schemes:
+ auto: Auto
+ light: Light
+ dark: Dark
+ preferred_map_color_scheme: Preferred Map Color Scheme
+ map_color_schemes:
+ auto: Auto
+ light: Light
+ dark: Dark
edit_preferences: Edit Preferences
edit:
title: Edit Preferences
message: Mesaĝo
node: Nodo
node_tag: Etikedo de nodo
+ note: Rimarko
old_node: Malnova nodo
old_node_tag: Etikedo de malnova nodo
old_relation: Malnova rilato
way: Linio
relation: Rilato
containing_relation:
- entry_role_html: Rilato %{relation_name} (kiel %{relation_role})
+ entry_role_html: '%{relation_name} (kiel %{relation_role})'
not_found:
title: Ne trovita
sorry: Bedaŭrinde la %{type} kun id %{id} ne troveblas.
open: Malfermita
resolved: Solvita
show:
- title: '%{status} problemo #%{issue_id}'
+ title:
+ open: 'Malfermita problemo #%{issue_id}'
+ ignored: 'Ignorita problemo #%{issue_id}'
+ resolved: 'Solvita problemo #%{issue_id}'
reports:
one: '%{count} raporto'
other: '%{count} raportoj'
reason: 'Kialo de blokado:'
revoker: 'Malblokanto:'
block:
- not_revoked: (ne nuligita)
show: Montri
edit: Redakti
page:
creator_name: Kreinto
reason: Kialo de blokado
status: Stato
- revoker_name: Nuligita de
navigation:
all_blocks: Ĉiuj blokadoj
blocks_on_me: Blokadoj por mi
open: Abierto
resolved: Resuelto
show:
- title: '%{status} Incidencia n.º %{issue_id}'
reports:
one: '%{count} reporte'
other: '%{count} reportes'
reason: 'Razón del bloqueo:'
revoker: 'Revocador:'
block:
- not_revoked: (no revocado)
show: Mostrar
edit: Editar
page:
creator_name: Creador
reason: Razón del bloqueo
status: Estado
- revoker_name: Revocado por
navigation:
all_blocks: Todos los bloqueos
blocks_on_me: Bloqueos sobre mí
reason: 'Blokeerimise põhjus:'
revoker: Tühistaja
block:
- not_revoked: (pole tühistatud)
show: Näita
edit: Redigeeri
page:
creator_name: Blokeerija
reason: Blokeerimise põhjus
status: Olek
- revoker_name: Tühistanud
navigation:
all_blocks: Kõik blokeeringud
blocks_on_me: Mulle seatud blokeeringud
other: '%{count} txosten'
reported_item: Salatutako elementua
show:
- title: '%{status} %{issue_id} arazoa'
reports:
one: '%{count} report'
other: '%{count} jakinarazpen'
reason: 'Blokeatzeko arrazoia:'
revoker: 'Ezeztatu duena:'
block:
- not_revoked: (ez da ezeztatu)
show: Erakutsi
edit: Aldatu
page:
creator_name: Egilea
reason: Blokeatzeko arrazoia
status: Egoera
- revoker_name: -k ezeztatua
notes:
index:
title: '%{user}k igotako edo iruzkinak utzitako oharrak'
other: '%{count} گزارش'
reported_item: مورد گزارششده
show:
- title: '%{status} موضوع #%{issue_id}'
reports:
one: '%{count} گزارش'
other: '%{count} گزارش'
reason: 'دلیل مسدودی:'
revoker: 'باطلکننده:'
block:
- not_revoked: (باطل نشده)
show: نمایش
edit: ویرایش
page:
creator_name: ایجادکننده
reason: دلیل مسدودی
status: وضعیت
- revoker_name: باطلکننده
navigation:
all_blocks: تمام قطع دسترسیها
blocks_on_me: قطع دسترسیهای من
other: '%{count} ilmiantoa'
reported_item: Ilmiannettu kohde
show:
- title: '%{status} Tapaus #%{issue_id}'
reports:
one: '%{count} ilmianto'
other: '%{count} ilmiantoa'
reason: 'Syy estoon:'
revoker: 'Estäjä:'
block:
- not_revoked: (ei kumottu)
show: Näytä
edit: Muokkaa
page:
creator_name: Tekijä
reason: Eston syy
status: Tila
- revoker_name: Eston tehnyt
user_mutes:
index:
table:
one: 1 ilmotus
other: '%{count} ilmiantoa'
show:
- title: '%{status} Tapaus #%{issue_id}'
reports:
zero: Ei ilmiantoa
one: Yksi ilmianto
message: Message
node: Nœud
node_tag: Attribut du nœud
+ note: Note
old_node: Ancien nœud
old_node_tag: Attribut de l’ancien nœud
old_relation: Ancienne relation
way: Chemin
relation: Relation
containing_relation:
- entry_role_html: Relation %{relation_name} (avec le rôle %{relation_role})
+ entry_role_html: '%{relation_name} (avec le rôle %{relation_role})'
not_found:
title: Non trouvé
sorry: Désolé, l’objet %{type} nº %{id} n’a pas pu être trouvé.
note: note
timeout:
title: Erreur de dépassement du délai d’attente
- sorry: Désolé, l'extraction des données pour le %{type} avec l'identifiant %{id}
- a pris trop de temps.
+ sorry: Désolé, l’extraction des données pour l’objet de type « %{type} » avec
+ l’identifiant %{id} a pris trop de temps.
type:
node: nœud
way: chemin
open: Ouvert
resolved: Résolu
show:
- title: Problème %{status} nº %{issue_id}
+ title:
+ open: 'Problème ouvert n° #%{issue_id}'
+ ignored: 'Problème ignoré n° #%{issue_id}'
+ resolved: 'Problème résolu n° #%{issue_id}'
reports:
one: '%{count} rapport'
other: '%{count} rapports'
reason: 'Raison du blocage :'
revoker: 'Révocateur :'
block:
- not_revoked: (non révoqué)
show: Afficher
edit: Modifier
page:
creator_name: Créateur
reason: Motif du blocage
status: État
- revoker_name: Révoqué par
navigation:
all_blocks: Tous les blocages
blocks_on_me: Blocages me concernant
reason: 'Reson dal bloc:'
revoker: 'Chel che al à revocât:'
block:
- not_revoked: (no revocât)
show: Mostre
edit: Cambie
page:
creator_name: Creadôr
reason: Reson dal bloc
status: Stât
- revoker_name: Revocât di
user_mutes:
index:
table:
other: '%{count} meldings'
reported_item: Meld elemint
show:
- title: '%{status} probleem #%{issue_id}'
reports:
one: 1 melding
other: '%{count} meldings'
reason: 'Reden foar útsluting:'
revoker: 'Ynlûker:'
block:
- not_revoked: (net ynlutsen)
show: Werjaan
edit: Bewurkje
page:
creator_name: Oanmakker
reason: Reden foar útsluting
status: Status
- revoker_name: Ynlutsen troch
notes:
index:
title: Troch %{user} yntsjinne as op reägearre notysjes
page:
last_updated: Nuashonrú deireanach
show:
- title: '%{status} Fadhb #%{issue_id}'
reports:
zero: Tuairisc ar bith
one: Tuairisc amháin
one: uair amháin an chloig
other: '%{count} uair an chloig'
block:
- not_revoked: (nár tarraingíodh siar)
show: Taispeáin
edit: Cuir in Eagar
page:
creator_name: Cruthaitheoir
reason: Cúis don bhac
status: Stádas
- revoker_name: Tarraingthe siar ag
notes:
index:
id: ID
reason: 'Adhbhar a'' bhacaidh:'
revoker: 'Cùl-ghairm le:'
block:
- not_revoked: (cha deach a chùl-ghairm)
show: Seall
edit: Deasaich
page:
creator_name: Cruthadair
reason: Adhbhar a' bhacaidh
status: Staid
- revoker_name: Air a chùl-ghairm le
notes:
index:
title: Nòtaichean a chuir %{user} a-null no a thug %{user} beachd dhaibh
message: Mensaxe
node: Nó
node_tag: Etiqueta do nó
+ note: Nota
old_node: Nó vello
old_node_tag: Etiqueta do nó vello
old_relation: Relación vella
way: Vía
relation: Relación
containing_relation:
- entry_role_html: Relación %{relation_name} (como %{relation_role})
+ entry_role_html: '%{relation_name} (como %{relation_role})'
not_found:
title: Non atopado
sorry: Sentímolo, non se puido atopar o/a %{type} co n.º %{id}.
open: Aberto
resolved: Resolto
show:
- title: '%{status} Erro n.º %{issue_id}'
+ title:
+ open: Problema aberto n.º %{issue_id}
+ ignored: Problema ignorado n.º %{issue_id}
+ resolved: Problema resolto n.º %{issue_id}
reports:
one: '%{count} denuncia'
other: '%{count} denuncias'
years:
one: '%{count} ano'
other: '%{count} anos'
+ short:
+ ended: finalizado
+ revoked_html: revogado por %{name}
+ active: activo
+ active_unread: activo sen ler
+ expired_unread: caducado sen ler
+ read_html: lido ás %{time}
+ time_in_future_title: '%{time_absolute}; en %{time_relative}'
+ time_in_past_title: '%{time_absolute}; %{time_relative}'
blocks_on:
title: Bloqueos feitos a %{name}
heading_html: Listaxe dos bloqueos feitos a %{name}
reason: 'Motivo para o bloqueo:'
revoker: 'Autor da revogación:'
block:
- not_revoked: (non revogado)
show: Amosar
edit: Editar
page:
display_name: Usuario bloqueado
creator_name: Creador
reason: Motivo para o bloqueo
+ start: Inicio
+ end: Fin
status: Estado
- revoker_name: Revogado por
navigation:
all_blocks: Todos os bloqueos
blocks_on_me: Os meus bloqueos
message: הודעה
node: נקודה
node_tag: תג נקודה
+ note: הערה
old_node: נקודה ישנה
old_node_tag: תג צומת ישן
old_relation: יחס ישן
open: פתוח
resolved: פתור
show:
- title: בעיה במצב %{status} מס׳ %{issue_id}
+ title:
+ open: בעיה פתוחה %{issue_id}
+ ignored: בעיה חסרת־השפעה %{issue_id}
+ resolved: בעיה פתורה %{issue_id}
reports:
one: דו״ח אחד
two: '%{count} דו״חות'
paragraph_1: בניגוד למפות אחרות, OpenStreetMap נוצרה לחלוטין על־ידי אנשים
כמוך והיא חופשית לתיקונים, עדכונים, הורדה ושימוש של כל מי שחפץ.
paragraph_2: אפשר להירשם כדי להתחיל לתרום.
- welcome: ברוך בואך ל־OoenStreetMap
+ welcome: ברוך בואך ל־OpenStreetMap
duplicate_social_email: אם כבר יש לך חשבון OpenStreetMap וברצונך להשתמש בספק
זהות של צד שלישי, נא להתחבר באמצעות הסיסמה שלך ולשנות את הגדרות החשבון שלך.
display name description: שם המשתמש שלך, שמוצג בפומבי. אפשר לשנות את זה בהעדפות
reason: 'סיבה לחסימה:'
revoker: 'מבטל:'
block:
- not_revoked: (לא בוטלה)
show: הצגה
edit: עריכה
page:
creator_name: יוצר
reason: סיבה לחסימה
status: מצב
- revoker_name: בוטלה על־ידי
navigation:
all_blocks: כל החסימות
blocks_on_me: חסימות שלי
filter:
not_revoke_admin_current_user: वर्तमान उपयोगकर्ता के द्वारा व्यवस्थापक भूमिका
को रद्द नहीं कर सकता है|
+ user_blocks:
+ page:
+ end: अन्त
notes:
index:
created_at: 'निर्माण का समय:'
reason: 'Razlog za blokadu:'
revoker: 'Opozivatelj:'
block:
- not_revoked: (nije opozvano)
show: Prikaži
edit: Uredi
page:
creator_name: Tvorac
reason: Razlog za blokadu
status: Status
- revoker_name: Opozvao
notes:
index:
title: Bilješke stvorio ili komentirao %{user}
other: '%{count} rozprawow'
reported_item: Zjewjeny objekt
show:
- title: '%{status} Problem čo. %{issue_id}'
reports:
one: '%{count} rozprawa'
two: '%{count} rozprawje'
reason: 'Přičina za blokowanje:'
revoker: 'Zeběracy wužiwar:'
block:
- not_revoked: (njezběhnjeny)
show: Pokazać
edit: Wobdźěłać
page:
creator_name: Blokowar
reason: Přičina za blokowanje
status: Status
- revoker_name: Zběhnjene wot
user_mutes:
index:
title: Zněmjeni wužiwarjo
open: Nyitva
resolved: Megoldva
show:
- title: '#%{issue_id} probléma %{status}'
reports:
one: '%{count} bejelentés'
other: '%{count} bejelentés'
reason: 'Blokkolás indoklása:'
revoker: 'Visszavonó:'
block:
- not_revoked: (nincs visszavonva)
show: Megjelenítés
edit: Szerkesztés
page:
creator_name: Készítő
reason: Blokkolás indoklása
status: Állapot
- revoker_name: 'Visszavonta:'
navigation:
all_blocks: Minden blokk
blocks_on_me: Engem sújtó blokkolások
open: Aperte
resolved: Resolvite
show:
- title: '%{status} Problema №%{issue_id}'
reports:
one: '%{count} reporto'
other: '%{count} reportos'
reason: 'Motivo del blocada:'
revoker: 'Revocator:'
block:
- not_revoked: (non revocate)
show: Monstrar
edit: Modificar
page:
creator_name: Creator
reason: Motivo del blocada
status: Stato
- revoker_name: Revocate per
navigation:
all_blocks: Tote le blocadas
blocks_on_me: Blocadas sur me
other: '%{count} Laporan'
reported_item: Butir dilaporkan
show:
- title: '%{status} Isu #%{issue_id}'
reports:
other: '%{count} laporan'
no_reports: Tidak ada laporan
reason: 'Alasan untuk blokir:'
revoker: 'Pembatal:'
block:
- not_revoked: (tidak dicabut)
show: Tampilkan
edit: Edit
page:
creator_name: Pencipta
reason: Alasan untuk blokir
status: Status
- revoker_name: Dibatalkan oleh
user_mutes:
index:
title: Pengguna yang Dibisukan
other: '%{count} skýrslur'
reported_item: Tilkynnt atriði
show:
- title: '%{status} vandamál #%{issue_id}'
reports:
one: '%{count} skýrsla'
other: '%{count} skýrslur'
reason: 'Ástæða banns:'
revoker: 'Eytt af:'
block:
- not_revoked: (ekki eytt)
show: Sýna
edit: Breyta
page:
creator_name: Búið til af
reason: Ástæða banns
status: Staða
- revoker_name: Eytt af
navigation:
all_blocks: Öll bönn
blocks_on_me: Bönn gegn mér
message: Messaggio
node: Nodo
node_tag: Etichetta del nodo
+ note: Nota
old_node: Vecchio nodo
old_node_tag: Vecchia etichetta del nodo
old_relation: Vecchia relazione
open: Aperto
resolved: Risolto
show:
- title: '%{status} Problema #%{issue_id}'
reports:
one: '%{count} segnalazione'
other: '%{count} segnalazioni'
title: Preferenze
preferred_editor: Editor preferito
preferred_languages: Lingue preferite
+ preferred_site_color_scheme: Schema di colori preferito per il sito web
+ site_color_schemes:
+ auto: Automatico
+ light: Chiaro
+ dark: Scuro
+ map_color_schemes:
+ auto: Automatico
+ light: Chiaro
+ dark: Scuro
edit_preferences: Modifica preferenze
edit:
title: Modifica preferenze
years:
one: '%{count} anno'
other: '%{count} anni'
+ short:
+ ended: terminato
+ revoked_html: revocato da %{name}
+ active: attivo
+ active_unread: attivo non letto
+ expired_unread: scaduto non letto
+ read_html: letto alle %{time}
+ time_in_future_title: '%{time_absolute}; in %{time_relative}'
+ time_in_past_title: '%{time_absolute}; %{time_relative}'
blocks_on:
title: Blocchi su %{name}
heading_html: Lista dei blocchi su %{name}
reason: 'Motivazione del blocco:'
revoker: 'Revocatore:'
block:
- not_revoked: (non revocato)
show: Mostra
edit: Modifica
page:
display_name: Utente bloccato
creator_name: Autore
reason: Motivo del blocco
+ start: Inizio
+ end: Fine
status: Stato
- revoker_name: Revocato da
navigation:
all_blocks: Tutti i blocchi
blocks_on_me: Blocchi su di me
open: 開く
resolved: 解決済
show:
- title: '%{status} 問題 #%{issue_id}'
reports:
other: '%{count}件のレポート'
no_reports: 報告はありません
reason: 'ブロックの理由:'
revoker: '取消:'
block:
- not_revoked: (取り消されていません)
show: 表示する
edit: 編集
page:
creator_name: 作成者
reason: ブロックされた理由
status: 状態
- revoker_name: 取り消し者
user_mutes:
index:
title: ミュートした利用者
reason: 'დაბლოკვის მიზეზი:'
revoker: 'განმბლოკველი:'
block:
- not_revoked: (არ არის განბლოკილი)
show: ჩვენება
edit: რედაქტირება
page:
creator_name: შემქმნელი
reason: დაბლოკვის მიზეზი
status: სტატუსი
- revoker_name: განბლოკილია
notes:
index:
creator: შემქმნელი
creator_name: Amernay
reason: Taɣzint n usewḥel
status: Addad
- revoker_name: Isewḥel-it
notes:
index:
heading: Tizmilin n %{user}
lawyer: 변호사 사무실
newspaper: 신문사
ngo: 비정부 기구 사무실
+ religion: 종교 사무소
research: 연구실
tax_advisor: 세무사
telecommunication: 통신 회사 사옥
massage: 안마시술소
medical_supply: 의료용품 공급점
mobile_phone: 휴대폰 상점
+ money_lender: 대금업자
motorcycle: 이륜자동차(오토바이) 상점
motorcycle_repair: 오토바이 수리점
music: 음반 가게
page:
user_not_found: 사용자가 존재하지 않습니다
issues_not_found: 해당 이슈를 찾을 수 없습니다
+ reported_user: 신고된 사용자
status: 상태
reports: 보고서
last_updated: 최근 업데이트
reports_count:
other: 신고 %{count}건
reported_item: 항목 신고함
+ states:
+ ignored: 무시됨
+ open: 열림
+ resolved: 해결됨
show:
- title: '%{status} 문제 #%{issue_id}'
reports:
other: 신고 %{count}건
no_reports: 보고서 없음
reason: '차단 이유:'
revoker: '해제:'
block:
- not_revoked: (철회하지 않음)
show: 보기
edit: 편집
page:
creator_name: 만든이
reason: 차단 이유
status: 상태
- revoker_name: 해제자
navigation:
all_blocks: 모든 차단
blocks_on_me: 나의 차단내역
other: '%{count} Rapor'
reported_item: Hêmanê Raporkirî
show:
- title: '%{status} Pirsgirêk #%{issue_id}'
reports:
one: '%{count} rapor'
other: '%{count} raporan'
reason: 'Sedema astengkirinê:'
revoker: Yê ku rakiriyeː
block:
- not_revoked: (ne betalkirî)
show: Nîşan bide
edit: Biguherîne
page:
creator_name: Çêker
reason: Sedema astengkirinê
status: Rewş
- revoker_name: Yê ku betal kiriyeː
notes:
index:
title: Notên ku ji aliyê %{user} ve hatine şandin an jî şirovekirin
way: Wee
relation: Relatioun
containing_relation:
- entry_role_html: Relatioun %{relation_name} (als %{relation_role})
+ entry_role_html: '%{relation_name} (als %{relation_role})'
not_found:
title: Net fonnt
sorry: Pardon, den %{type}#%{id}, konnt net fonnt ginn.
open: Oppen
resolved: Geléist
show:
- title: '%{status} Problem Nr. %{issue_id}'
reports:
one: '%{count} Meldung'
other: '%{count} Meldungen'
years:
one: '%{count} Joer'
other: '%{count} Joren'
+ short:
+ active: aktiv
blocks_on:
title: Späre vum %{name}
empty: '%{name} gouf bis elo nach net gespaart.'
edit: Änneren
reason: 'Grond fir d''Spär:'
block:
- not_revoked: (net opgehuewen)
show: Weisen
edit: Änneren
page:
display_name: Gespaarte Benotzer
reason: Grond fir d'Spär
status: Status
- revoker_name: Opgehuewe vum
user_mutes:
index:
table:
open: Atidaryta
resolved: Išspręsta
show:
- title: '%{status} Problema #%{issue_id}'
reports:
one: '{%count} pranešimas'
few: '%{count} pranešimai'
reason: 'Blokavimo priežastis:'
revoker: 'Atšaukėjas:'
block:
- not_revoked: (neatšauktas)
show: Rodyti
edit: Keisti
page:
creator_name: Kūrėjas
reason: Blokavimo priežastis
status: Būsena
- revoker_name: Atšaukė
navigation:
all_blocks: Visi blokavimai
blocks_on_me: Mano blokavimai
reason: 'Bloķēšanas iemesls:'
revoker: 'Atsaucējs:'
block:
- not_revoked: (nav atsaukts)
show: Rādīt
edit: Labot
page:
creator_name: Autors
reason: Iemesls liegumam
status: Statuss
- revoker_name: Atsaucis
notes:
index:
title: Piezīmes, kuras veidojis vai komentējis %{user}
open: Отворено
resolved: Решено
show:
- title: '%{status} Проблем бр. #%{issue_id}'
reports:
one: '%{count} пријава'
other: '%{count} пријави'
reason: 'Причина за блокирање:'
revoker: 'Поништувач:'
block:
- not_revoked: (не се поништува)
show: Прикажи
edit: Уреди
page:
creator_name: Создавач
reason: Причина за блокирање
status: Статус
- revoker_name: 'Поништил:'
navigation:
all_blocks: Сите блокови
blocks_on_me: Добиени блокови
reason: 'Sebab sekatan:'
revoker: 'Penarik balik:'
block:
- not_revoked: (tidak ditarik balik)
show: Tunjukkan
edit: Sunting
page:
creator_name: Pembuat
reason: Sebab sekatan
status: Status
- revoker_name: Ditarik balik oleh
user_mutes:
index:
title: Pengguna yang Diredamkan
other: '%{count} rapporter'
reported_item: Rapportert element
show:
- title: '%{status} Sak #%{issue_id}'
reports:
one: '%{count} rapport'
other: '%{count} rapporter'
reason: 'Årsak for blokkering:'
revoker: 'Tilbakekaller:'
block:
- not_revoked: (ikke tilbakekalt)
show: Vis
edit: Rediger
page:
creator_name: Opprettet av
reason: Årsak for blokkering
status: Status
- revoker_name: Tilbakekalt av
notes:
index:
title: Merknader sendt inn eller kommentert på av %{user}
message: Bericht
node: Knooppunt
node_tag: Knooppuntlabel
+ note: Opmerking
old_node: Oud knooppunt
old_node_tag: Oud knooppuntlabel
old_relation: Oude relatie
way: Weg
relation: Relatie
containing_relation:
- entry_role_html: Relatie %{relation_name} (als %{relation_role})
+ entry_role_html: '%{relation_name} (als %{relation_role})'
not_found:
title: Kon niet gevonden worden
sorry: 'De %{type} #%{id} kon helaas niet worden gevonden.'
open: Open
resolved: Opgelost
show:
- title: '%{status} Probleem #%{issue_id}'
+ title:
+ open: 'Open probleem #%{issue_id}'
+ ignored: 'Genegeerd probleem #%{issue_id}'
+ resolved: 'Opgelost probleem #%{issue_id}'
reports:
one: '%{count} rapport'
other: '%{count} rapporten'
reason: 'Reden voor blokkade:'
revoker: 'Ingetrokken door:'
block:
- not_revoked: (niet ingetrokken)
show: Weergeven
edit: Bewerken
page:
creator_name: Auteur
reason: Reden voor blokkade
status: Status
- revoker_name: Ingetrokken door
navigation:
all_blocks: Alle blokkades
blocks_on_me: Blokkades voor u
other: '%{count} meldingar'
reported_item: Meld objekt
show:
- title: '%{status} Sak #%{issue_id}'
reports:
one: '%{count} melding'
other: '%{count} meldingar'
reason: 'Årsak for blokkering:'
revoker: 'Tilbakekaller:'
block:
- not_revoked: (ikkje tilbakekalt)
show: Vis
edit: Rediger
page:
creator_name: Oppretta av
reason: Årsak for blokkering
status: Status
- revoker_name: Tilbakekalt av
notes:
index:
heading: '%{user} sine merknadar'
last_updated: ߟߏ߲ߘߐߦߊߟߌ ߞߐ߯ߟߕߊ
reported_item: ߝߛߌ߬ ߟߊߞߏߝߐߣߍ߲
show:
- title: '%{status} ߝߌ߬ߛߌ #%{issue_id}'
report_created_at_html: ߞߏߝߐߟߌ߫ ߝߟߐ ߞߍ߫ ߘߊ߫ %{datetime}
last_resolved_at_html: ߢߊߓߐߟߌ߫ ߟߊߓߊ߲ ߞߍ߫ ߘߊ߫ %{datetime}
last_updated_at_html: ߊ߬ ߟߊߛߋ߫ ߟߊߓߊ߲ ߞߍ߫ ߘߊ߫ ߘߊߞߎ߲ ߘߐ߫ %{datetime} ߊ߬ ߣߌ߫ %{displayname}
other: '%{count} rapòrts'
reported_item: Element raportat
show:
- title: '%{status} Incidéncia #%{issue_id}'
reports:
zero: Ges de rapòrt
one: 1 rapport
reason: 'Motiu del blocatge :'
revoker: 'Revocador :'
block:
- not_revoked: (pas revocat)
show: Mostrar
edit: Modificar
page:
creator_name: Creator
reason: Motiu del blocatge
status: Estatut
- revoker_name: Revocat per
notes:
index:
title: Nòtas somesas o comentadas per %{user}
open: ਖੋਲ੍ਹੋ
resolved: ਹੱਲ-ਕੱਢਿਆ ਗਿਆ
show:
- title: '%{status} ਮੁੱਦਾ #%{issue_id}'
+ title:
+ open: 'ਮੁੱਦਾ ਖੋਲ੍ਹੋ #%{issue_id}'
+ ignored: 'ਮੁੱਦਾ ਨਜ਼ਰਅੰਦਾਜ਼ ਕੀਤਾ #%{issue_id}'
+ resolved: 'ਮੁੱਦਾ ਹੱਲ ਕੀਤਾ ਗਿਆ #%{issue_id}'
no_reports: ਕੋਈ ਇਤਲਾਹ ਨਹੀਂ
report_created_at_html: ਪਹਿਲੀ ਵਾਰ %{datetime} ਨੂੰ ਇਤਲਾਹ ਕੀਤੀ ਗਈ
last_resolved_at_html: ਆਖਰੀ ਵਾਰ %{datetime} 'ਤੇ ਹੱਲ ਕੀਤਾ ਗਿਆ
show:
title: ਮੇਰੀਆਂ ਤਰਜੀਹਾਂ
preferred_languages: ਤਰਜੀਹੀ ਬੋਲੀਆਂ
+ site_color_schemes:
+ auto: ਆਪਣੇ-ਆਪ
+ light: ਚਾਨਣ
+ dark: ਗੂੜ੍ਹਾ
+ map_color_schemes:
+ auto: ਆਪਣੇ-ਆਪ
+ light: ਚਾਨਣ
+ dark: ਗੂੜ੍ਹਾ
edit_preferences: ਤਰਜੀਹਾਂ ਨੂੰ ਸੋਧੋ
edit:
title: ਤਰਜੀਹਾਂ ਨੂੰ ਸੋਧੋ
years:
one: '%{count} ਸਾਲ'
other: '%{count} ਸਾਲ'
+ short:
+ ended: ਖਤਮ ਹੋ ਗਿਆ/ਗਈ
+ active: ਸਰਗਰਮ
+ expired_unread: ਨਹੀਂ-ਪੜ੍ਹਿਆ ਦੀ ਮਿਆਦ ਪੁੱਗ ਗਈ
show:
created: 'ਬਣਾਇਆ ਗਿਆ:'
duration: 'ਮਿਆਦ:'
display_name: ਰੋਕਿਆ ਵਰਤੋਂਕਾਰ
creator_name: ਸਿਰਜਣਹਾਰ
reason: ਰੋਕ ਦਾ ਕਾਰਨ
+ start: ਸ਼ੁਰੂ ਕਰੋ
+ end: ਖ਼ਤਮ
status: ਦਰਜਾ
user_mutes:
index:
open: Otwórz
resolved: Rozwiązane
show:
- title: '%{status} sprawa #%{issue_id}'
reports:
one: '%{count} zgłoszenie'
few: '%{count} zgłoszenia'
reason: 'Przyczyna blokady:'
revoker: 'Cofający uprawnienia:'
block:
- not_revoked: (nieodwołana)
show: Pokaż
edit: Edytuj
page:
creator_name: Twórca
reason: Powód blokady
status: Status
- revoker_name: Odwołana przez
navigation:
all_blocks: Wszystkie blokady
blocks_on_me: Blokady nałożone na mnie
other: '%{count} رپورٹاں'
reported_item: رپورٹ دی چیز
show:
- title: '[%{status}] مسئلہ: %{issue_id}'
reports:
other: zeroرپورٹ نہیں
one: اِکّ رپورٹ
edit: سودھو
revoker: 'پرتاؤݨ والا:'
block:
- not_revoked: (نہیں پرتائی دتی گئی)
show: وکھاؤ
edit: سودھو
page:
open: Aberta
resolved: Resolvida
show:
- title: '%{status} Denúncia #%{issue_id}'
reports:
one: '%{count} denúncia'
other: '%{count} denúncias'
reason: 'Razão do bloqueio:'
revoker: 'Quem revogou:'
block:
- not_revoked: (não revogado)
show: Mostrar
edit: Editar
page:
creator_name: Criador
reason: Motivo do bloqueio
status: Estado
- revoker_name: Revogado por
navigation:
all_blocks: Todos os bloqueios
blocks_on_me: Quem me bloqueou
open: Abrir
resolved: Resolvido
show:
- title: '%{status} Problema #%{issue_id}'
reports:
one: '%{count} denúncia'
other: '%{count} denúncias'
reason: 'Razão do bloqueio:'
revoker: 'Quem retirou:'
block:
- not_revoked: (não retirado)
show: Exibir
edit: Editar
page:
creator_name: Criador
reason: Razão para o bloqueio
status: Status
- revoker_name: Retirado por
navigation:
all_blocks: Todos os bloqueios
blocks_on_me: Bloqueios sobre mim
open: Deschis
resolved: Rezolvat
show:
- title: '%{status} Problema #%{issue_id}'
reports:
one: '%{count} raport'
few: '%{count} raporturi'
reason: 'Motivul blocării:'
revoker: Revocă!
block:
- not_revoked: (nu este revocată)
show: Arată
edit: Modificare
page:
creator_name: Creator
reason: Motivul blocării
status: Stare
- revoker_name: Revocat de
user_mutes:
index:
table:
message: Сообщение
node: Точка
node_tag: Тег точки
+ note: Заметка
old_node: Старая точка
old_node_tag: Старый тег точки
old_relation: Старое отношение
introduction: Нажмите на карту, чтобы найти ближайшие объекты
nearby: Ближайшие объекты
enclosing: Окружающие объекты
+ nodes:
+ timeout:
+ sorry: Извините, данные для точки с id %{id} потребовали слишком много времени
+ для извлечения.
old_nodes:
not_found:
sorry: 'К сожалению, узел #%{id} версии %{version} не найден.'
+ timeout:
+ sorry: Извините, история точки с id %{id} потребовала слишком много времени
+ для извлечения.
+ ways:
+ timeout:
+ sorry: Извините, данные для линии с id %{id} потребовали слишком много времени
+ для извлечения.
old_ways:
not_found:
sorry: 'К сожалению, путь #%{id} версии %{version} не найден.'
+ timeout:
+ sorry: Извините, история линии с id %{id} потребовала слишком много времени
+ для извлечения.
+ relations:
+ timeout:
+ sorry: Извините, данные для отношения с id %{id} потребовали слишком много времени
+ для извлечения.
old_relations:
not_found:
sorry: 'К сожалению, отношение #%{id} версии %{version} не найдено.'
+ timeout:
+ sorry: Извините, история отношения с id %{id} потребовала слишком много времени
+ для извлечения.
changeset_comments:
feeds:
comment:
other: '%{count} сообщений'
reported_item: Элемент в сообщении
show:
- title: '%{status} Проблема #%{issue_id}'
+ title:
+ open: 'Открытая проблема #%{issue_id}'
+ ignored: 'Проигнорированная проблема #%{issue_id}'
+ resolved: 'Разрешённая проблема #%{issue_id}'
reports:
one: 1 сообщение
few: '%{count} сообщения'
reason: 'Причина блокировки:'
revoker: 'Разблокировавший:'
block:
- not_revoked: (не разблокирован)
show: Показать
edit: Править
page:
creator_name: Автор
reason: Причина блокировки
status: Состояние
- revoker_name: Разблокировал
user_mutes:
index:
title: Заглушённые пользователи
other: '%{count} sinnalatziones'
reported_item: Elementu sinnaladu
show:
- title: '%{status} Problema #%{issue_id}'
reports:
one: '%{count} sinnalatzione'
other: '%{count} sinnalatziones'
reason: 'Resone de su blocu:'
revoker: 'Revocadore:'
block:
- not_revoked: (non revocadu)
show: Ammustra
edit: Modìfica
page:
creator_name: Creadore
reason: Resone de su blocu
status: Istadu
- revoker_name: Revocadu dae
navigation:
all_blocks: Totu sos blocos
blocks_on_me: Blocos subra a mene
friendly: '%e %B %Y ê %H:%M'
helpers:
file:
- prompt: Scarta u pricu
+ prompt: Scarta lu file
submit:
diary_comment:
create: Cummenta
trace:
user: Utenti
visible: Visìbbili
- name: Nomu dû pricu
+ name: Nomu dû file
size: Grannizza
latitude: Latitùdini
longitude: Luncitùdini
public: Pùbblicu
description: Discrizzioni
- gpx_file: Scarta u pricu dâ traccia GPS
+ gpx_file: Scarta lu file dâ traccia GPS
visibility: Visibbilità
tagstring: Etichetti
message:
html: Stai taliannu la virsioni n lingua ngrisa dâ pàggina dû drittu d'auturi.
Poi turnari â %{native_link} di sta pàggina o puru poi finiri di nfurmàriti
supra ô drittu d'auturi e %{mapping_link}.
- native_link: virsioni n sicilianu
+ native_link: virsioni 'n sicilianu
mapping_link: accuminzari a mappari
legal_babble:
credit_title_html: Comu s'attribbuisci a OpenStreetMap
reason: 'Mutivu dû bloccu:'
revoker: 'Rivucaturi:'
block:
- not_revoked: (nun arrivucatu)
show: Ammustra
edit: Cancia
page:
creator_name: Criaturi
reason: Mutivu dû bloccu
status: Statu
- revoker_name: Arrivucatu di
notes:
index:
title: Noti scritti o cummintati di l'utenti %{user}
-# Messages for Serbo-Croatian (srpskohrvatski / српскохрватски)
+# Messages for Serbo-Croatian (Latin script) (srpskohrvatski (latinica))
# Exported from translatewiki.net
# Export driver: phpyaml
# Author: Vlad5250
open: Otvorené
resolved: Vyriešené
show:
- title: '%{status} Problém #%{issue_id}'
reports:
one: '%{count} hlásenie'
few: '%{count} hlásenia'
reason: 'Dôvod blokovania:'
revoker: 'Odvolal:'
block:
- not_revoked: (nezrušený)
show: Zobraziť
edit: Upraviť
page:
creator_name: Tvorca
reason: Dôvod pre blokovanie
status: Stav
- revoker_name: Zrušil
user_mutes:
index:
title: Stlmení používatelia
other: '%{count} poročil'
reported_item: Prijavljeni predmet
show:
- title: '%{status} Težava #%{issue_id}'
reports:
one: '%{count} prijava'
two: '%{count} prijavi'
reason: 'Razlog za blokiranje:'
revoker: 'Preklical:'
block:
- not_revoked: (ni preklicano)
show: Prikaži
edit: Uredi
page:
creator_name: Ustvarjalec
reason: Razlog za blokiranje
status: Stanje
- revoker_name: Preklical
navigation:
block: 'Blokiraj #%{id}'
user_mutes:
edit: Redakto
page:
status: Statusi
- revoker_name: Revokuar nga
notes:
show:
title: 'Shënim: %{id}'
reason: 'Razlog za blokiranje:'
revoker: 'Opozivalac:'
block:
- not_revoked: (nije opozvano)
show: Prikaži
edit: Uredi
page:
creator_name: Tvorac
reason: Razlozi za blokiranje
status: Stanje
- revoker_name: Opozvao
notes:
notes_paging_nav:
showing_page: Prikaz stranice %{page}
message: Порука
node: Чвор
node_tag: Ознака тачке
+ note: Напомена
old_node: Стари чвор
old_node_tag: Ознака старе тачке
old_relation: Стари однос
reason: 'Разлог за блокирање:'
revoker: 'Опозивалац:'
block:
- not_revoked: (није опозвано)
show: Прикажи
edit: Уреди
page:
creator_name: Творац
reason: Разлози за блокирање
status: Стање
- revoker_name: Опозвао
user_mutes:
index:
title: Пригушени корисници
open: Öppen
resolved: Löst
show:
- title: '%{status} Ärende nr %{issue_id}'
reports:
one: '%{count} rapport'
other: '%{count} rapporter'
reason: 'Anledning för blockering:'
revoker: 'Återkallare:'
block:
- not_revoked: (Inte återkallat)
show: Visa
edit: Redigera
page:
creator_name: Skapare
reason: Orsak till blockering
status: Status
- revoker_name: Återkallad av
navigation:
all_blocks: Alla blockeringar
blocks_on_me: Blockeringar på mig
other: '%{count} ఫిర్యాదులు'
reported_item: అంశంపై ఫిర్యాదు చేసారు
show:
- title: '%{status} అంశం #%{issue_id}'
report_created_at_html: '%{datetime} న మొదటిసారి ఫిర్యాదు చేసారు'
last_resolved_at_html: '%{datetime} న చివరిగా పరిష్కరించారు'
last_updated_at_html: చివరిగా %{displayname} గారు %{datetime} కు తాజాకరించారు
reason: 'నిరోధానికి కారణం:'
revoker: 'ఎత్తివేసేవారు:'
block:
- not_revoked: (ఎత్తివేయలేదు)
show: చూపించు
edit: మార్చు
page:
creator_name: సృష్టికర్త
reason: నిరోధానికి కారణం
status: స్థితి
- revoker_name: ఎత్తివేసినవారు
notes:
index:
title: గమనికలు సమర్పించినది లేదా వ్యాఖ్యానించినది %{user}
other: '%{count} การรายงาน'
reported_item: รายการที่รายงาน
show:
- title: 'ปัญหา %{status} #%{issue_id}'
reports:
other: '%{count} การรายงาน'
no_reports: ไม่มีรายงาน
edit: แก้ไข
reason: 'เหตุผลสำหรับการระงับใช้งาน:'
block:
- not_revoked: (ไม่ได้มีการยกเลิก)
show: แสดง
edit: แก้ไข
page:
creator_name: ผู้สั่งให้ระงับ
reason: เหตุผลที่ต้องระงับใช้งาน
status: สถานะ
- revoker_name: ยกเลิกโดย
notes:
index:
heading: หมายเหตุของ %{user}
other: '%{count} mga Ulat'
reported_item: Naiulat na bagay
show:
- title: '%{status} Isyu #%{issue_id}'
reports:
one: 1 ulat
other: '%{count} mga ulat'
reason: 'Dahilan ng paghadlang:'
revoker: 'Tagapagbawi:'
block:
- not_revoked: (hindi binawi)
show: Ipakita
edit: Baguhin
page:
creator_name: Tagapaglikha
reason: Dahilan ng pagharang
status: Kalagayan
- revoker_name: Binawi ni
notes:
index:
title: Mga tala na isinumite o pinuna ni %{user}
open: Aç
resolved: Çözüldü
show:
- title: '%{status} Sorun #%{issue_id}'
reports:
one: '%{count} rapor'
other: '%{count} rapor'
reason: 'Engellenme sebebi:'
revoker: 'Geri alan:'
block:
- not_revoked: (iptal edilmemiş)
show: Göster
edit: Düzenle
page:
creator_name: Oluşturan
reason: Engellenme sebebi
status: Durum
- revoker_name: İptal eden
navigation:
all_blocks: Tüm Engellemeler
blocks_on_me: Engellendiklerim
message: Повідомлення
node: Точка
node_tag: Теґ точки
+ note: Примітка
old_node: Стара точка
old_node_tag: Старий теґ точки
old_relation: Старий зв’язок
open: Відкрито
resolved: Вирішено
show:
- title: 'Звернення #%{issue_id} - %{status}'
reports:
one: '%{count} скарга'
few: '%{count} скарги'
reason: 'Причина блокування:'
revoker: 'Розблокував:'
block:
- not_revoked: (не розблокований)
show: Показати
edit: Редагувати
page:
creator_name: Автор
reason: Причина блокування
status: Стан
- revoker_name: Розблокував
navigation:
all_blocks: Всі блокування
blocks_on_me: Мої блокування
other: '%{count} Báo cáo'
reported_item: Mục Báo cáo
show:
- title: 'Vấn đề %{status} #%{issue_id}'
reports:
other: '%{count} báo cáo'
no_reports: Không có báo cáo
reason: 'Lý do cấm:'
revoker: 'Người bỏ cấm:'
block:
- not_revoked: (không bị hủy)
show: Hiện
edit: Sửa đổi
page:
creator_name: Người cấm
reason: Lý do cấm
status: Trạng thái
- revoker_name: Người bỏ cấm
navigation:
all_blocks: Tất cả các Tác vụ Cấm
blocks_on_me: Tác vụ Cấm Tôi
message: 消息
node: 节点
node_tag: 节点标签
+ note: 注释
old_node: 旧节点
old_node_tag: 旧节点标签
old_relation: 旧关系
way: 路径
relation: 关系
containing_relation:
- entry_role_html: 关系 %{relation_name} (作为 %{relation_role})
+ entry_role_html: '%{relation_name} (作为 %{relation_role})'
not_found:
title: 未找到
sorry: '抱歉,无法找到 %{type} #%{id}。'
open: 开放
resolved: 已解决
show:
- title: '%{status}问题#%{issue_id}'
reports:
one: '%{count}个举报'
other: '%{count}个举报'
reason: 封禁的原因:
revoker: 撤销者:
block:
- not_revoked: (未撤销)
show: 显示
edit: 编辑
page:
creator_name: 创建者
reason: 封禁的原因
status: 状态
- revoker_name: 撤销者
navigation:
all_blocks: 所有封禁
blocks_on_me: 对我的封禁
open: 開放
resolved: 已解決
show:
- title: '%{status} 問題 #%{issue_id}'
reports:
one: '%{count} 份回報'
other: '%{count} 份回報'
reason: 封鎖的理由:
revoker: 撤銷者:
block:
- not_revoked: (沒有撤銷)
show: 顯示
edit: 編輯
page:
creator_name: 建立者
reason: 封鎖的理由
status: 狀態
- revoker_name: 撤銷者
navigation:
all_blocks: 所有封鎖
blocks_on_me: 對我的封鎖
end
post "/user/messages/:id" => "messages#update", :as => :api_message_update
-
- post "gpx/create" => "traces#create"
- get "gpx/:id" => "traces#show", :as => :api_trace, :id => /\d+/
- put "gpx/:id" => "traces#update", :id => /\d+/
- delete "gpx/:id" => "traces#destroy", :id => /\d+/
- get "gpx/:id/details" => "traces#show", :id => /\d+/
- get "gpx/:id/data" => "traces#data", :as => :api_trace_data
end
namespace :api, :path => "api/0.6" do
+ resources :traces, :path => "gpx", :only => [:create, :show, :update, :destroy], :id => /\d+/ do
+ scope :module => :traces do
+ resource :data, :only => :show
+ end
+ end
+ post "gpx/create" => "traces#create", :id => /\d+/, :as => :trace_create
+ get "gpx/:id/details" => "traces#show", :id => /\d+/, :as => :trace_details
+
# Map notes API
resources :notes, :except => [:new, :edit, :update], :id => /\d+/, :controller => "notes" do
collection do
--- /dev/null
+require "test_helper"
+
+module Api
+ module Traces
+ class DataControllerTest < ActionDispatch::IntegrationTest
+ ##
+ # test all routes which lead to this controller
+ def test_routes
+ assert_routing(
+ { :path => "/api/0.6/gpx/1/data", :method => :get },
+ { :controller => "api/traces/data", :action => "show", :trace_id => "1" }
+ )
+ assert_routing(
+ { :path => "/api/0.6/gpx/1/data.xml", :method => :get },
+ { :controller => "api/traces/data", :action => "show", :trace_id => "1", :format => "xml" }
+ )
+ end
+
+ # Test downloading a trace through the api
+ def test_show
+ public_trace_file = create(:trace, :visibility => "public", :fixture => "a")
+
+ # First with no auth
+ get api_trace_data_path(public_trace_file)
+ assert_response :unauthorized
+
+ # Now with some other user, which should work since the trace is public
+ auth_header = bearer_authorization_header
+ get api_trace_data_path(public_trace_file), :headers => auth_header
+ follow_redirect!
+ follow_redirect!
+ check_trace_data public_trace_file, "848caa72f2f456d1bd6a0fdf228aa1b9"
+
+ # And finally we should be able to do it with the owner of the trace
+ auth_header = bearer_authorization_header public_trace_file.user
+ get api_trace_data_path(public_trace_file), :headers => auth_header
+ follow_redirect!
+ follow_redirect!
+ check_trace_data public_trace_file, "848caa72f2f456d1bd6a0fdf228aa1b9"
+ end
+
+ # Test downloading a compressed trace through the api
+ def test_data_compressed
+ identifiable_trace_file = create(:trace, :visibility => "identifiable", :fixture => "d")
+
+ # Authenticate as the owner of the trace we will be using
+ auth_header = bearer_authorization_header identifiable_trace_file.user
+
+ # First get the data as is
+ get api_trace_data_path(identifiable_trace_file), :headers => auth_header
+ follow_redirect!
+ follow_redirect!
+ check_trace_data identifiable_trace_file, "c6422a3d8750faae49ed70e7e8a51b93", "application/gzip", "gpx.gz"
+
+ # Now ask explicitly for XML format
+ get api_trace_data_path(identifiable_trace_file, :format => "xml"), :headers => auth_header
+ check_trace_data identifiable_trace_file, "abd6675fdf3024a84fc0a1deac147c0d", "application/xml", "xml"
+
+ # Now ask explicitly for GPX format
+ get api_trace_data_path(identifiable_trace_file, :format => "gpx"), :headers => auth_header
+ check_trace_data identifiable_trace_file, "abd6675fdf3024a84fc0a1deac147c0d"
+ end
+
+ # Check an anonymous trace can't be downloaded by another user through the api
+ def test_data_anon
+ anon_trace_file = create(:trace, :visibility => "private", :fixture => "b")
+
+ # First with no auth
+ get api_trace_data_path(anon_trace_file)
+ assert_response :unauthorized
+
+ # Now with some other user, which shouldn't work since the trace is anon
+ auth_header = bearer_authorization_header
+ get api_trace_data_path(anon_trace_file), :headers => auth_header
+ assert_response :forbidden
+
+ # And finally we should be able to do it with the owner of the trace
+ auth_header = bearer_authorization_header anon_trace_file.user
+ get api_trace_data_path(anon_trace_file), :headers => auth_header
+ follow_redirect!
+ follow_redirect!
+ check_trace_data anon_trace_file, "db4cb5ed2d7d2b627b3b504296c4f701"
+ end
+
+ # Test downloading a trace that doesn't exist through the api
+ def test_data_not_found
+ deleted_trace_file = create(:trace, :deleted)
+
+ # Try first with no auth, as it should require it
+ get api_trace_data_path(0)
+ assert_response :unauthorized
+
+ # Login, and try again
+ auth_header = bearer_authorization_header
+ get api_trace_data_path(0), :headers => auth_header
+ assert_response :not_found
+
+ # Now try a trace which did exist but has been deleted
+ auth_header = bearer_authorization_header deleted_trace_file.user
+ get api_trace_data_path(deleted_trace_file), :headers => auth_header
+ assert_response :not_found
+ end
+
+ private
+
+ def check_trace_data(trace, digest, content_type = "application/gpx+xml", extension = "gpx")
+ assert_response :success
+ assert_equal digest, Digest::MD5.hexdigest(response.body)
+ assert_equal content_type, response.media_type
+ assert_equal "attachment; filename=\"#{trace.id}.#{extension}\"; filename*=UTF-8''#{trace.id}.#{extension}", @response.header["Content-Disposition"]
+ end
+ end
+ end
+end
# test all routes which lead to this controller
def test_routes
assert_routing(
- { :path => "/api/0.6/gpx/create", :method => :post },
+ { :path => "/api/0.6/gpx", :method => :post },
{ :controller => "api/traces", :action => "create" }
)
+ assert_recognizes(
+ { :controller => "api/traces", :action => "create" },
+ { :path => "/api/0.6/gpx/create", :method => :post }
+ )
assert_routing(
{ :path => "/api/0.6/gpx/1", :method => :get },
{ :controller => "api/traces", :action => "show", :id => "1" }
{ :controller => "api/traces", :action => "show", :id => "1" },
{ :path => "/api/0.6/gpx/1/details", :method => :get }
)
- assert_routing(
- { :path => "/api/0.6/gpx/1/data", :method => :get },
- { :controller => "api/traces", :action => "data", :id => "1" }
- )
- assert_routing(
- { :path => "/api/0.6/gpx/1/data.xml", :method => :get },
- { :controller => "api/traces", :action => "data", :id => "1", :format => "xml" }
- )
end
# Check getting a specific trace through the api
assert_response :not_found
end
- # Test downloading a trace through the api
- def test_data
- public_trace_file = create(:trace, :visibility => "public", :fixture => "a")
-
- # First with no auth
- get api_trace_data_path(public_trace_file)
- assert_response :unauthorized
-
- # Now with some other user, which should work since the trace is public
- auth_header = bearer_authorization_header
- get api_trace_data_path(public_trace_file), :headers => auth_header
- follow_redirect!
- follow_redirect!
- check_trace_data public_trace_file, "848caa72f2f456d1bd6a0fdf228aa1b9"
-
- # And finally we should be able to do it with the owner of the trace
- auth_header = bearer_authorization_header public_trace_file.user
- get api_trace_data_path(public_trace_file), :headers => auth_header
- follow_redirect!
- follow_redirect!
- check_trace_data public_trace_file, "848caa72f2f456d1bd6a0fdf228aa1b9"
- end
-
- # Test downloading a compressed trace through the api
- def test_data_compressed
- identifiable_trace_file = create(:trace, :visibility => "identifiable", :fixture => "d")
-
- # Authenticate as the owner of the trace we will be using
- auth_header = bearer_authorization_header identifiable_trace_file.user
-
- # First get the data as is
- get api_trace_data_path(identifiable_trace_file), :headers => auth_header
- follow_redirect!
- follow_redirect!
- check_trace_data identifiable_trace_file, "c6422a3d8750faae49ed70e7e8a51b93", "application/gzip", "gpx.gz"
-
- # Now ask explicitly for XML format
- get api_trace_data_path(identifiable_trace_file, :format => "xml"), :headers => auth_header
- check_trace_data identifiable_trace_file, "abd6675fdf3024a84fc0a1deac147c0d", "application/xml", "xml"
-
- # Now ask explicitly for GPX format
- get api_trace_data_path(identifiable_trace_file, :format => "gpx"), :headers => auth_header
- check_trace_data identifiable_trace_file, "abd6675fdf3024a84fc0a1deac147c0d"
- end
-
- # Check an anonymous trace can't be downloaded by another user through the api
- def test_data_anon
- anon_trace_file = create(:trace, :visibility => "private", :fixture => "b")
-
- # First with no auth
- get api_trace_data_path(anon_trace_file)
- assert_response :unauthorized
-
- # Now with some other user, which shouldn't work since the trace is anon
- auth_header = bearer_authorization_header
- get api_trace_data_path(anon_trace_file), :headers => auth_header
- assert_response :forbidden
-
- # And finally we should be able to do it with the owner of the trace
- auth_header = bearer_authorization_header anon_trace_file.user
- get api_trace_data_path(anon_trace_file), :headers => auth_header
- follow_redirect!
- follow_redirect!
- check_trace_data anon_trace_file, "db4cb5ed2d7d2b627b3b504296c4f701"
- end
-
- # Test downloading a trace that doesn't exist through the api
- def test_data_not_found
- deleted_trace_file = create(:trace, :deleted)
-
- # Try first with no auth, as it should require it
- get api_trace_data_path(:id => 0)
- assert_response :unauthorized
-
- # Login, and try again
- auth_header = bearer_authorization_header
- get api_trace_data_path(:id => 0), :headers => auth_header
- assert_response :not_found
-
- # Now try a trace which did exist but has been deleted
- auth_header = bearer_authorization_header deleted_trace_file.user
- get api_trace_data_path(deleted_trace_file), :headers => auth_header
- assert_response :not_found
- end
-
# Test creating a trace through the api
def test_create
# Get file to use
user = create(:user)
# First with no auth
- post gpx_create_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "trackable" }
+ post api_traces_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "trackable" }
assert_response :unauthorized
# Rewind the file
# Create trace and import tracepoints in background job
perform_enqueued_jobs do
- post gpx_create_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "trackable" }, :headers => auth_header
+ post api_traces_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :visibility => "trackable" }, :headers => auth_header
end
assert_response :success
# Now authenticated, with the legacy public flag
assert_not_equal "public", user.preferences.find_by(:k => "gps.trace.visibility").v
auth_header = bearer_authorization_header user
- post gpx_create_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 1 }, :headers => auth_header
+ post api_traces_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 1 }, :headers => auth_header
assert_response :success
trace = Trace.find(response.body.to_i)
assert_equal "a.gpx", trace.name
second_user = create(:user)
assert_nil second_user.preferences.find_by(:k => "gps.trace.visibility")
auth_header = bearer_authorization_header second_user
- post gpx_create_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 0 }, :headers => auth_header
+ post api_traces_path, :params => { :file => file, :description => "New Trace", :tags => "new,trace", :public => 0 }, :headers => auth_header
assert_response :success
trace = Trace.find(response.body.to_i)
assert_equal "a.gpx", trace.name
private
- def check_trace_data(trace, digest, content_type = "application/gpx+xml", extension = "gpx")
- assert_response :success
- assert_equal digest, Digest::MD5.hexdigest(response.body)
- assert_equal content_type, response.media_type
- assert_equal "attachment; filename=\"#{trace.id}.#{extension}\"; filename*=UTF-8''#{trace.id}.#{extension}", @response.header["Content-Disposition"]
- end
-
##
# build XML for traces
# this builds a minimum viable XML for the tests in this suite
def test_update_preferred_editor
user = create(:user, :languages => [])
+ user.preferences.create(:k => "site.color_scheme", :v => "light")
+ user.preferences.create(:k => "map.color_scheme", :v => "light")
session_for(user)
# Changing to a invalid editor should fail
assert_select ".alert-success", false
assert_select ".alert-danger", true
assert_select "form > div > select#user_preferred_editor > option[selected]", false
+ assert_equal "light", user.preferences.find_by(:k => "site.color_scheme")&.v
+ assert_equal "light", user.preferences.find_by(:k => "map.color_scheme")&.v
# Changing to a valid editor should work
user.preferred_editor = "id"
assert_template :show
assert_select ".alert-success", /^Preferences updated/
assert_select "dd", "iD (in-browser editor)"
+ assert_equal "light", user.preferences.find_by(:k => "site.color_scheme")&.v
+ assert_equal "light", user.preferences.find_by(:k => "map.color_scheme")&.v
# Changing to the default editor should work
user.preferred_editor = "default"
assert_template :show
assert_select ".alert-success", /^Preferences updated/
assert_select "dd", "Default (currently iD)"
+ assert_equal "light", user.preferences.find_by(:k => "site.color_scheme")&.v
+ assert_equal "light", user.preferences.find_by(:k => "map.color_scheme")&.v
+ end
+
+ def test_update_preferred_site_color_scheme
+ user = create(:user, :languages => [])
+ session_for(user)
+ assert_nil user.preferences.find_by(:k => "site.color_scheme")
+
+ # Changing when previously not defined
+ put preferences_path, :params => { :user => user.attributes, :site_color_scheme => "light" }
+ assert_redirected_to preferences_path
+ follow_redirect!
+ assert_template :show
+ assert_select ".alert-success", /^Preferences updated/
+ assert_equal "light", user.preferences.find_by(:k => "site.color_scheme")&.v
+
+ # Changing when previously defined
+ put preferences_path, :params => { :user => user.attributes, :site_color_scheme => "auto" }
+ assert_redirected_to preferences_path
+ follow_redirect!
+ assert_template :show
+ assert_select ".alert-success", /^Preferences updated/
+ assert_equal "auto", user.preferences.find_by(:k => "site.color_scheme")&.v
+ end
+
+ def test_update_preferred_map_color_scheme
+ user = create(:user, :languages => [])
+ session_for(user)
+ assert_nil user.preferences.find_by(:k => "map.color_scheme")
+
+ # Changing when previously not defined
+ put preferences_path, :params => { :user => user.attributes, :map_color_scheme => "light" }
+ assert_redirected_to preferences_path
+ follow_redirect!
+ assert_template :show
+ assert_select ".alert-success", /^Preferences updated/
+ assert_equal "light", user.preferences.find_by(:k => "map.color_scheme")&.v
+
+ # Changing when previously defined
+ put preferences_path, :params => { :user => user.attributes, :map_color_scheme => "auto" }
+ assert_redirected_to preferences_path
+ follow_redirect!
+ assert_template :show
+ assert_select ".alert-success", /^Preferences updated/
+ assert_equal "auto", user.preferences.find_by(:k => "map.color_scheme")&.v
end
end