From: Andy Allan Date: Thu, 21 Mar 2024 14:01:13 +0000 (+0000) Subject: Merge pull request #4602 from AntonKhorev/no-lego-trace-details X-Git-Tag: live~641 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/0dc86d6cd47faa42ff6b538bd0342a1486e313b2?hp=76a46824a469d31f1a00164586bad959d990bf66 Merge pull request #4602 from AntonKhorev/no-lego-trace-details Avoid lego translation in trace time/user/tags string --- diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb index 0ee5bf9c0..34046bcab 100644 --- a/app/views/layouts/_head.html.erb +++ b/app/views/layouts/_head.html.erb @@ -11,6 +11,6 @@ <%= yield :head %> <%= yield :auto_discovery_link_tag %> <%= csrf_meta_tag %> - <%= csp_meta_tag %> + <%= "#{@title} | " if @title %><%= t "layouts.project_name.title" %> <% end %> diff --git a/app/views/traces/index.html.erb b/app/views/traces/index.html.erb index 63ade87d7..447716a18 100644 --- a/app/views/traces/index.html.erb +++ b/app/views/traces/index.html.erb @@ -33,7 +33,7 @@ <%= link_to t(".my_traces"), { :action => "mine" }, { :class => "nav-link active" } %> <% else %> - + @@ -43,7 +43,7 @@ <% end %> <% end %> diff --git a/config/locales/ast.yml b/config/locales/ast.yml index 5dbc9e106..4e66093e4 100644 --- a/config/locales/ast.yml +++ b/config/locales/ast.yml @@ -27,7 +27,7 @@ ast: create: Espublizar update: Actualizar issue_comment: - create: Añedir comentariu + create: Añader comentariu message: create: Unviar client_application: diff --git a/config/locales/cs.yml b/config/locales/cs.yml index cd529fae5..db059dc58 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1786,10 +1786,8 @@ cs: partial_changeset_without_comment: bez komentáře details: Více informací o této sadě změn lze nalézt na %{url}. details_html: Více informací o této sadě změn lze nalézt na %{url}. - unsubscribe: Pro odhlášení z aktualizací této sady změn jděte na %{url} a klikněte - na „Zrušit odebírání“. - unsubscribe_html: Pro odhlášení z aktualizací této sady změn jděte na %{url} - a klikněte na „Zrušit odebírání“. + unsubscribe: Od aktualizací této sady změn se můžete odhlásit na %{url}. + unsubscribe_html: Od aktualizací této sady změn se můžete odhlásit na %{url}. confirmations: confirm: heading: Zkontrolujte si e-mail! @@ -1892,7 +1890,7 @@ cs: new: title: Ztracené heslo heading: Zapomněli jste heslo? - email address: 'E-mailová adresa:' + email address: E-mailová adresa new password button: Resetovat heslo help_text: Zadejte e-mailovou adresu, pod kterou jste se zaregistrovali, my vám na ni pošleme odkaz, pomocí kterého si nastavíte nové heslo. @@ -2294,8 +2292,8 @@ cs: title: Průvodce začátečníka description: Komunitou spravovaná příručka pro začátečníky. community: - title: Komunitní fórum - description: Sdílený prostor pro diskuse o OpenStreetMap. + title: Nápověda a komunitní fórum + description: Sdílený prostor, kde můžete získat pomoc a diskutovat o OpenStreetMap. mailing_lists: title: E-mailové konference description: Položte dotaz nebo diskutujte o zajímavých věcech na některé diff --git a/config/locales/da.yml b/config/locales/da.yml index 4afd66d77..5da11fde3 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1594,6 +1594,8 @@ da: intro_text: OpenStreetMap er et kort over verden, skabt af folk som dig og gratis at bruge under en åben licens. intro_2_create_account: Opret en brugerkonto + hosting_partners_2024_html: Hosting støttes af %{fastly}, %{corpmembers}, og andre + %{partners}. partners_fastly: Fastly partners_corpmembers: OSMF virksomhedsmedlemmer partners_partners: partnere diff --git a/config/locales/dsb.yml b/config/locales/dsb.yml index 0c60715d4..cfa851c2e 100644 --- a/config/locales/dsb.yml +++ b/config/locales/dsb.yml @@ -13,14 +13,24 @@ dsb: formats: friendly: '%e. %B %Y %H:%M' helpers: + file: + prompt: Dataju wubraś submit: diary_comment: - create: Składowaś + create: Komentěrowaś + diary_entry: + create: Wózjawiś + update: Aktualizěrowaś + issue_comment: + create: Komentar pśidaś message: create: Pósłaś client_application: create: Registrěrowaś - update: Wobźěłaś + update: Aktualizěrowaś + oauth2_application: + create: Registrěrowaś + update: Aktualizěrowaś redaction: create: Redakciju napóraś update: Redakciju składowaś @@ -147,6 +157,10 @@ dsb: entry: comment: Komentar full: Dopołna pokazka + account: + deletions: + show: + cancel: Pśetergnuś accounts: edit: title: Konto wobźěłaś @@ -1082,10 +1096,15 @@ dsb: edit_preferences: Preference wobźěłaś edit: title: Preference wobźěłaś + save: Preference aktualizěrowaś + cancel: Pśetergnuś + update: + failure: Preference njedaju se aktualizěrowaś. update_success_flash: message: Preference su se zaktualizěrowali. profiles: edit: + cancel: Pśetergnuś image: 'Wobraz:' gravatar: gravatar: Gravatar wužywaś @@ -1343,6 +1362,7 @@ dsb: nagrate, nježli až nagrajoš dalšne, až njeby cakański rěd blokěrował za drugich wužywarjow. edit: + cancel: Pśetergnuś title: Wobźěłujo se slěd %{name} heading: Wobźěłujo se slěd %{name} visibility_help: Co to groni? diff --git a/config/locales/es.yml b/config/locales/es.yml index 6fac40d2b..fd16257f7 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -3035,7 +3035,7 @@ es: option_1: Si eres nuevo en OpenStreetMap, crea una cuenta nueva usando el formulario a continuación. option_2: |- - Si ya tienes una cuenta, puedes iniciar sesión a tu cuenta + Si ya tienes una cuenta, puedes iniciar sesión con tu cuenta usando tu nombre de usuario y contraseña y luego asociar la cuenta con tu identificador en tus configuraciones de usuario. user_role: diff --git a/config/locales/fi.yml b/config/locales/fi.yml index d116bf387..30846ebe9 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1001,7 +1001,7 @@ fi: meadow: Niitty military: Sotilasalue mine: Kaivos - orchard: Puutarha + orchard: Hedelmätarha plant_nursery: Taimitarha quarry: Avolouhos railway: Rautatie @@ -1724,6 +1724,7 @@ fi: to: Vastaanottaja subject: Otsikko date: Päiväys + actions: Toiminnot message_summary: unread_button: Merkitse lukemattomaksi read_button: Merkitse luetuksi @@ -1743,6 +1744,7 @@ fi: body: Valitettavasti tällä ID-tunnuksella ei ole viestiä. outbox: title: Lähetetyt + actions: Toiminnot messages: one: Kansiossa on %{count} lähetetty viesti. other: Kansiossa on %{count} lähetettyä viestiä. @@ -1856,7 +1858,7 @@ fi: alt: Kirjaudu sisään Microsoft-tililläsi github: title: Kirjaudu GitHubin avulla - alt: Kirjaudu käyttämällä GitHub-tiliäsi + alt: Kirjaudu GitHub-tilin avulla wikipedia: title: Kirjaudu sisään Wikipedialla alt: Kirjaudu sisään Wikipedia-tunnuksella @@ -2199,6 +2201,7 @@ fi: admin: Hallinnollinen raja capital: Pääkaupunki city: Kaupunki + orchard: Hedelmätarha vineyard: Viinitarha forest: Talousmetsä wood: Metsä diff --git a/config/locales/hsb.yml b/config/locales/hsb.yml index a9652efb6..e0050dddf 100644 --- a/config/locales/hsb.yml +++ b/config/locales/hsb.yml @@ -1784,10 +1784,10 @@ hsb: edit_preferences: Preferency wobdźěłać edit: title: Preferency wobdźěłać - save: Nastajenja aktualizować + save: Preferency aktualizować cancel: Přetorhnyć update: - failure: Nastajenja njedachu so aktualizować. + failure: Preferency njedachu so aktualizować. update_success_flash: message: Nastajenja su so zaktualizowali. profiles: diff --git a/config/locales/lb.yml b/config/locales/lb.yml index a6eb4ab13..e6bfc561e 100644 --- a/config/locales/lb.yml +++ b/config/locales/lb.yml @@ -1730,9 +1730,9 @@ lb: Kontakt ophuelen? people_mapping_nearby: Mapperen an der Noperschaft reply: - wrong_user: Du bass als '%{user}' ugemellt, awer d'Noriicht, déis du beäntwere - wollts, gouf un en anere Benotzer geschéckt. Mell dech fir d'Beäntwerte wannechgelift - mat dem richtege Benotzer un. + wrong_user: Dir sidd als '%{user}' ugemellt, awer d'Noriicht, déi Dir beäntwere + wollt, gouf un en anere Benotzer geschéckt. Mellt Iech fir d'Beäntwerte wannechgelift + mat dem richtege Benotzerkont un. show: title: Message liesen reply_button: Äntwerten @@ -1812,13 +1812,13 @@ lb: failure: De Profil konnt net aktualiséiert ginn. sessions: new: - title: Umellen - heading: Umellen + title: Aloggen + heading: Aloggen email or username: E-Mail-Adress oder Benotzernumm password: Passwuert remember: Sech u mech erënneren lost password link: Hutt Dir Äert Passwuert vergiess? - login_button: Umellen + login_button: Aloggen register now: Elo aschreiwen with external: 'Benotzt alternativ eng Drëtt Partei fir anzeloggen:' no account: Hutt Dir kee Benotzerkont? @@ -1826,29 +1826,29 @@ lb: openid_logo_alt: Alogge mat enger OpenID auth_providers: openid: - title: Alogge mat OpenID - alt: Alogge mat enger OpenID URL + title: Mat OpenID aloggen + alt: Mat enger OpenID-URL aloggen google: - title: Alogge mat Google - alt: Alogge mat enger Google OpenID + title: Mat Google aloggen + alt: Mat enger Google-OpenID aloggen facebook: title: Mat Facebook aloggen - alt: Mat engem Facebook Benotzerkont aloggen + alt: Mat engem Facebook-Kont aloggen microsoft: title: Mat Microsoft aloggen - alt: Mat engem Microsoft-Benotzerkont aloggen + alt: Mat engem Microsoft-Kont aloggen github: title: Mat GitHub aloggen - alt: Mat engem GitHub-Konto aloggen + alt: Mat engem GitHub-Kont aloggen wikipedia: title: Mat Wikipedia aloggen alt: Mat engem Wikipedia-Benotzerkont aloggen wordpress: - title: Alogge mat Wordpress - alt: Alogge mat enger Wordpress OpenID + title: Mat Wordpress aloggen + alt: Mat enger Wordpress-OpenID aloggen aol: - title: Alogge mat AOL - alt: Alogge mat enger AOL OpenID + title: Mat AOL aloggen + alt: Mat enger AOL-OpenID aloggen destroy: title: Ofmellen heading: Vun OpenStreetMap ofmellen diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 690d6f538..4a23b53e0 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -6,6 +6,7 @@ # Author: Buraddo # Author: C1pr1an # Author: Cevamihnea +# Author: Cristina S # Author: EddyPetrisor # Author: GabiBil # Author: Gravitystorm @@ -1912,7 +1913,7 @@ ro: auth_providers: openid: title: Login with OpenID - alt: Conectați-vă cu o adresă URL OpenID + alt: Conectați-vă cu un URL OpenID google: title: Autentificare cu Google alt: Conectați-vă cu un Google OpenID @@ -1923,7 +1924,7 @@ ro: title: Conectare cu Microsoft alt: Conectare cu un Cont Microsoft github: - title: Conectați-vă cu GitHub + title: Conectare cu GitHub alt: Conectați-vă cu un cont GitHub wikipedia: title: Autentificare la Wikipedia @@ -1933,7 +1934,7 @@ ro: alt: Conectați-vă cu un cont Wordpress OpenID aol: title: Conectați-vă cu AOL - alt: Conectați-vă cu un AOL OpenID + alt: Conectare cu un AOL OpenID destroy: title: Ieșire heading: Deconectare din OpenStreetMap @@ -2894,8 +2895,8 @@ ro: utilizând formularul de mai jos. option_2: |- Dacă aveți deja un cont, vă puteți conecta la contul dvs. - utilizând numele de utilizator și parola și apoi asociați contul - cu ID-ul în setările utilizatorului. + folosind numele de utilizator și parola și apoi puteți asocia contul + cu ID-ul dvs. în setările utilizatorului. user_role: filter: not_a_role: Șirul `%{role}' nu este un rol valid. diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 0840309c7..fe36d345a 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -25,6 +25,7 @@ # Author: DDPAT # Author: Danieldegroot2 # Author: Diralik +# Author: Dirruw'o # Author: Dmitry-s93 # Author: Dr&mx # Author: Edible Melon @@ -642,7 +643,7 @@ ru: user_title: Дневник пользователя %{user} leave_a_comment: Оставить комментарий login_to_leave_a_comment_html: '%{login_link}, чтобы оставить комментарий' - login: Представьтесь + login: Войти no_such_entry: title: Нет такой записи в дневнике heading: Нет записи с номером %{id} @@ -2689,7 +2690,7 @@ ru: display name description: Ваше имя, как оно будет видно другим пользователям. Вы сможете изменить его позже в настройках. external auth: 'Внешний сайт с учётной записью:' - use external auth: Либо воспользуйтесь аккаунтом с другого сайта + use external auth: Альтернативно, используйте третье лицо для входа в систему. auth no password: С внешним логином пароль не обязателен, но в некоторых случаях он необходим continue: Зарегистрироваться diff --git a/config/locales/scn.yml b/config/locales/scn.yml index 1672f906e..a7b19e71e 100644 --- a/config/locales/scn.yml +++ b/config/locales/scn.yml @@ -327,7 +327,7 @@ scn: changeset_paging_nav: showing_page: Pàggina %{page} next: Appressu » - previous: « Prima + previous: « Arreri changeset: anonymous: Anònimu no_edits: (nuddu canciamentu) diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 0a9d08886..54aeb75e8 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1619,12 +1619,12 @@ sr: alt: Пријава преко Microsoft налога github: title: Пријава коришћењем GitHub-а - alt: Пријава коришћењем GitHub налога + alt: Пријава преко GitHub налога wikipedia: title: Пријава преко Википедије - alt: Пријава коришћењем Википедија налога + alt: Пријава преко Википедијиног налога wordpress: - title: Пријава коришћењем Wordpress-а + title: Пријава преко Wordpress-а alt: Пријава преко Wordpress OpenID-а aol: title: Пријава преко AOL-а diff --git a/config/locales/tr.yml b/config/locales/tr.yml index b75837e27..8852e94e7 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1999,7 +1999,7 @@ tr: title: OpenID ile giriş alt: OpenID Bağlantısı ile giriş google: - title: Google ile oturum aç + title: Google ile giriş alt: Google OpenID ile giriş facebook: title: Facebook ile giriş diff --git a/test/controllers/traces_controller_test.rb b/test/controllers/traces_controller_test.rb index 9a818786d..d187f2264 100644 --- a/test/controllers/traces_controller_test.rb +++ b/test/controllers/traces_controller_test.rb @@ -172,6 +172,7 @@ class TracesControllerTest < ActionDispatch::IntegrationTest # Check the index of traces for a specific user def test_index_user user = create(:user) + checked_user_traces_path = url_for :only_path => true, :controller => "traces", :action => "index", :display_name => user.display_name second_user = create(:user) third_user = create(:user) create(:trace) @@ -187,18 +188,33 @@ class TracesControllerTest < ActionDispatch::IntegrationTest # Test the user with the traces - should see only public ones get traces_path(:display_name => user.display_name) check_trace_index [trace_b] + assert_dom ".nav-tabs" do + assert_dom "a[href='#{traces_path}']", :text => "All Traces", :count => 1 + assert_dom "a[href='#{traces_mine_path}']", :text => "My Traces", :count => 0 + assert_dom "a[href='#{checked_user_traces_path}']", :text => Regexp.new(Regexp.escape(user.display_name)), :count => 1 + end session_for(third_user) # Should still see only public ones when authenticated as another user get traces_path(:display_name => user.display_name) check_trace_index [trace_b] + assert_dom ".nav-tabs" do + assert_dom "a[href='#{traces_path}']", :text => "All Traces", :count => 1 + assert_dom "a[href='#{traces_mine_path}']", :text => "My Traces", :count => 1 + assert_dom "a[href='#{checked_user_traces_path}']", :text => Regexp.new(Regexp.escape(user.display_name)), :count => 1 + end session_for(user) # Should see all traces when authenticated as the target user get traces_path(:display_name => user.display_name) check_trace_index [trace_c, trace_b] + assert_dom ".nav-tabs" do + assert_dom "a[href='#{traces_path}']", :text => "All Traces", :count => 1 + assert_dom "a[href='#{traces_mine_path}']", :text => "My Traces", :count => 1 + assert_dom "a[href='#{checked_user_traces_path}']", :text => Regexp.new(Regexp.escape(user.display_name)), :count => 0 + end # Should only see traces with the correct tag when a tag is specified get traces_path(:display_name => user.display_name, :tag => "London") diff --git a/test/factories/user_blocks.rb b/test/factories/user_blocks.rb index 2f68dc8dc..6d5c02a03 100644 --- a/test/factories/user_blocks.rb +++ b/test/factories/user_blocks.rb @@ -11,10 +11,12 @@ FactoryBot.define do end trait :expired do + created_at { Time.now.utc - 2.days } ends_at { Time.now.utc - 1.day } end trait :revoked do + expired revoker :factory => :moderator_user end end