//= require i18n
//= require i18n/embed
-window.onload = function () {
- if (navigator.languages) {
- I18n.locale = navigator.languages[0];
- } else if (navigator.language) {
- I18n.locale = navigator.language;
- }
+if (navigator.languages) {
+ I18n.locale = navigator.languages[0];
+} else if (navigator.language) {
+ I18n.locale = navigator.language;
+}
+window.onload = function () {
var query = (window.location.search || '?').slice(1),
args = {};
# Set the message as being read or unread.
def mark
- @message = Message.where(:recipient => current_user).or(Message.where(:sender => current_user)).find(params[:message_id])
+ @message = current_user.messages.find(params[:message_id])
if params[:mark] == "unread"
message_read = false
notice = t ".as_unread"
:size => "36"),
auth_path(options.merge(:provider => provider)),
:method => :post,
- :class => "auth_button p-2 d-block",
+ :class => "auth_button btn btn-light mx-1 p-2 d-block",
:title => t("application.auth_providers.#{name}.title")
)
end
:size => "36") + t("application.auth_providers.#{name}.title"),
auth_path(options.merge(:provider => provider)),
:method => :post,
- :class => "auth_button fs-6 border rounded text-body-secondary text-decoration-none py-2 px-4 d-flex justify-content-center align-items-center",
+ :class => "auth_button btn btn-outline-secondary fs-6 border rounded py-2 px-4 d-flex justify-content-center align-items-center",
:title => t("application.auth_providers.#{name}.title")
)
end
"#",
:id => "openid_open_url",
:title => t("application.auth_providers.openid.title"),
- :class => "p-2 d-block" %>
+ :class => "btn btn-light mx-1 p-2 d-block" %>
<% %w[google facebook microsoft github wikipedia].each do |provider| %>
<% unless @preferred_auth_provider == provider %>
sotmeu_2024:
id: sotmeu_2024
alt: State of the Map Europe 2024
- link: https://tobilet.pl/state-of-the-map-europe-2024.html
+ link: https://stateofthemap.eu/
img: banners/StateoftheMapEurope_2024.png
enddate: 2024-jul-18
sotmasia_2023:
college: "College Building"
commercial: "Commercial Building"
construction: "Building under Construction"
+ cowshed: "Cowshed"
detached: "Detached House"
dormitory: "Dormitory"
duplex: "Duplex House"
shed: "Shed"
stable: "Stable"
static_caravan: "Caravan"
+ sty: "Sty"
temple: "Temple Building"
terrace: "Terrace Building"
train_station: "Train Station Building"
##
# test the mark action
def test_mark
- user = create(:user)
+ sender_user = create(:user)
recipient_user = create(:user)
other_user = create(:user)
- message = create(:message, :unread, :sender => user, :recipient => recipient_user)
+ message = create(:message, :unread, :sender => sender_user, :recipient => recipient_user)
# Check that the marking a message requires us to login
post message_mark_path(message)
assert_response :not_found
assert_template "no_such_message"
+ # Login as the message sender_user
+ session_for(sender_user)
+
+ # Check that marking a message we sent fails
+ post message_mark_path(message)
+ assert_response :not_found
+ assert_template "no_such_message"
+
# Login as the message recipient_user
session_for(recipient_user)
def test_auth_button
button = auth_button("google", "google")
img_tag = "<img alt=\"Log in with a Google OpenID\" class=\"rounded-1\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"
- assert_equal("<a class=\"auth_button p-2 d-block\" title=\"Log in with Google\" rel=\"nofollow\" data-method=\"post\" href=\"/auth/google\">#{img_tag}</a>", button)
+ assert_equal("<a class=\"auth_button btn btn-light mx-1 p-2 d-block\" title=\"Log in with Google\" rel=\"nofollow\" data-method=\"post\" href=\"/auth/google\">#{img_tag}</a>", button)
end
private
--- /dev/null
+require "application_system_test_case"
+
+class EmbedTest < ApplicationSystemTestCase
+ test "shows localized report link" do
+ visit export_embed_path
+ assert_link "Report a problem"
+ end
+end
+
+class GermanEmbedTest < ApplicationSystemTestCase
+ driven_by :selenium, :using => :headless_firefox, :options => { :name => :selenium_de } do |options|
+ options.add_preference("intl.accept_languages", "de")
+ end
+
+ test "shows localized report link" do
+ visit export_embed_path
+ assert_link "Ein Problem melden"
+ end
+end
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.6.2.tgz#1816b5f6948029c5eaacb0703b850ee0cb37d8f8"
integrity sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==
-"@eslint/config-array@^0.16.0":
- version "0.16.0"
- resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.16.0.tgz#bb3364fc39ee84ec3a62abdc4b8d988d99dfd706"
- integrity sha512-/jmuSd74i4Czf1XXn7wGRWZCuyaUZ330NH1Bek0Pplatt4Sy1S5haN21SCLLdbeKslQ+S0wEJ+++v5YibSi+Lg==
+"@eslint/config-array@^0.17.0":
+ version "0.17.0"
+ resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.17.0.tgz#ff305e1ee618a00e6e5d0485454c8d92d94a860d"
+ integrity sha512-A68TBu6/1mHHuc5YJL0U0VVeGNiklLAL6rRmhTCP2B5XjWLMnrX+HkO+IAXyHvks5cyyY1jjK5ITPQ1HGS2EVA==
dependencies:
"@eslint/object-schema" "^2.1.4"
debug "^4.3.1"
- minimatch "^3.0.5"
+ minimatch "^3.1.2"
"@eslint/eslintrc@^3.1.0":
version "3.1.0"
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
-"@eslint/js@9.5.0":
- version "9.5.0"
- resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.5.0.tgz#0e9c24a670b8a5c86bff97b40be13d8d8f238045"
- integrity sha512-A7+AOT2ICkodvtsWnxZP4Xxk3NbZ3VMHd8oihydLRGrJgqqdEz1qSeEgXYyT/Cu8h1TWWsQRejIx48mtjZ5y1w==
+"@eslint/js@9.6.0":
+ version "9.6.0"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.6.0.tgz#5b0cb058cc13d9c92d4e561d3538807fa5127c95"
+ integrity sha512-D9B0/3vNg44ZeWbYMpBoXqNP4j6eQD5vNwIlGAuFRRzK/WtT/jvDQW3Bi9kkf3PMDMlM7Yi+73VLUsn5bJcl8A==
"@eslint/object-schema@^2.1.4":
version "2.1.4"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
-acorn@^8.11.3:
- version "8.11.3"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a"
- integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==
+acorn@^8.12.0:
+ version "8.12.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.0.tgz#1627bfa2e058148036133b8d9b51a700663c294c"
+ integrity sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==
ajv@^6.12.4:
version "6.12.6"
integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==
eslint@^9.0.0:
- version "9.5.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.5.0.tgz#11856034b94a9e1a02cfcc7e96a9f0956963cd2f"
- integrity sha512-+NAOZFrW/jFTS3dASCGBxX1pkFD0/fsO+hfAkJ4TyYKwgsXZbqzrw+seCYFCcPCYXvnD67tAnglU7GQTz6kcVw==
+ version "9.6.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.6.0.tgz#9f54373afa15e1ba356656a8d96233182027fb49"
+ integrity sha512-ElQkdLMEEqQNM9Njff+2Y4q2afHk7JpkPvrd7Xh7xefwgQynqPxwf55J7di9+MEibWUGdNjFF9ITG9Pck5M84w==
dependencies:
"@eslint-community/eslint-utils" "^4.2.0"
"@eslint-community/regexpp" "^4.6.1"
- "@eslint/config-array" "^0.16.0"
+ "@eslint/config-array" "^0.17.0"
"@eslint/eslintrc" "^3.1.0"
- "@eslint/js" "9.5.0"
+ "@eslint/js" "9.6.0"
"@humanwhocodes/module-importer" "^1.0.1"
"@humanwhocodes/retry" "^0.3.0"
"@nodelib/fs.walk" "^1.2.8"
escape-string-regexp "^4.0.0"
eslint-scope "^8.0.1"
eslint-visitor-keys "^4.0.0"
- espree "^10.0.1"
+ espree "^10.1.0"
esquery "^1.5.0"
esutils "^2.0.2"
fast-deep-equal "^3.1.3"
strip-ansi "^6.0.1"
text-table "^0.2.0"
-espree@^10.0.1:
- version "10.0.1"
- resolved "https://registry.yarnpkg.com/espree/-/espree-10.0.1.tgz#600e60404157412751ba4a6f3a2ee1a42433139f"
- integrity sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==
+espree@^10.0.1, espree@^10.1.0:
+ version "10.1.0"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-10.1.0.tgz#8788dae611574c0f070691f522e4116c5a11fc56"
+ integrity sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==
dependencies:
- acorn "^8.11.3"
+ acorn "^8.12.0"
acorn-jsx "^5.3.2"
eslint-visitor-keys "^4.0.0"
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
-minimatch@^3.0.5, minimatch@^3.1.2:
+minimatch@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==