From 7c4a76cc89824544d45135def033d3d651bea345 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 7 Nov 2021 21:02:06 +0100 Subject: [PATCH] More bidi improvements Signed-off-by: Thomas Citharel --- config/dev.exs | 2 +- js/src/common.scss | 33 +++++++++++ .../components/About/InstanceContactLink.vue | 4 +- js/src/components/Account/ActorCard.vue | 2 +- js/src/components/Comment/Comment.vue | 4 +- js/src/components/Event/EventMetadataList.vue | 1 + .../components/Event/EventMinimalistCard.vue | 1 + .../Event/EventParticipationCard.vue | 4 +- .../Event/FullAddressAutoComplete.vue | 1 + js/src/components/Event/OrganizerPicker.vue | 3 +- .../Event/OrganizerPickerWrapper.vue | 2 + .../components/Event/ParticipationButton.vue | 4 +- js/src/components/Event/TagInput.vue | 1 + js/src/components/Post/PostListItem.vue | 3 +- js/src/components/SearchField.vue | 1 + js/src/i18n/ar.json | 2 +- js/src/i18n/be.json | 2 +- js/src/i18n/ca.json | 3 +- js/src/i18n/cs.json | 2 +- js/src/i18n/de.json | 3 +- js/src/i18n/en_US.json | 3 +- js/src/i18n/es.json | 5 +- js/src/i18n/fa.json | 2 +- js/src/i18n/fi.json | 3 +- js/src/i18n/fr_FR.json | 5 +- js/src/i18n/gd.json | 3 +- js/src/i18n/gl.json | 3 +- js/src/i18n/hu.json | 3 +- js/src/i18n/id.json | 3 +- js/src/i18n/it.json | 3 +- js/src/i18n/nl.json | 2 +- js/src/i18n/nn.json | 5 +- js/src/i18n/oc.json | 3 +- js/src/i18n/pl.json | 3 +- js/src/i18n/pt.json | 2 +- js/src/i18n/pt_BR.json | 3 +- js/src/i18n/ru.json | 3 +- js/src/i18n/sl.json | 3 +- js/src/i18n/sv.json | 4 +- js/src/utils/i18n.ts | 6 ++ js/src/views/About/AboutInstance.vue | 4 +- js/src/views/Event/Edit.vue | 1 + js/src/views/Event/Event.vue | 57 ++++--------------- js/src/views/Group/Group.vue | 8 ++- js/src/views/Posts/Edit.vue | 1 + js/src/views/Search.vue | 1 + .../__snapshots__/PostListItem.spec.ts.snap | 12 ++-- lib/web/views/utils.ex | 11 +++- 48 files changed, 127 insertions(+), 113 deletions(-) diff --git a/config/dev.exs b/config/dev.exs index 291bdc463..cd4d9ea1c 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -58,7 +58,7 @@ config :logger, :console, format: "[$level] $message\n", level: :debug config :mobilizon, Mobilizon.Service.Geospatial, service: Mobilizon.Service.Geospatial.Nominatim -config :mobilizon, Mobilizon.Web.Gettext, allowed_locales: ["fr", "en"] +config :mobilizon, Mobilizon.Web.Gettext, allowed_locales: ["fr", "en", "ar"] # Set a higher stacktrace during development. Avoid configuring such # in production as building large stacktraces may be expensive. diff --git a/js/src/common.scss b/js/src/common.scss index 9566e8925..65301b01b 100644 --- a/js/src/common.scss +++ b/js/src/common.scss @@ -165,3 +165,36 @@ p { .icon { vertical-align: middle; } + +.tags .tag:not(:last-child) { + margin-right: unset; + @include margin-right(0.5rem); +} + +.button .icon { + &:first-child:not(:last-child) { + @include margin-left(calc(-0.5em - 1px)); + @include margin-right(0.25em); + } + &:last-child:not(:first-child) { + @include margin-right(calc(-0.5em - 1px)); + @include margin-left(0.25em); + } +} + +.buttons .button:not(:last-child):not(.is-fullwidth) { + margin-right: unset; + @include margin-right(0.5rem); +} + +.breadcrumb li:first-child a { + padding-left: unset; + @include padding-left(0); + @include padding-right(0.75em); +} +.media-left { + @include margin-left(1rem); +} +a.dropdown-item { + @include padding-right(3rem); +} diff --git a/js/src/components/About/InstanceContactLink.vue b/js/src/components/About/InstanceContactLink.vue index 80d17ecea..429e7fb67 100644 --- a/js/src/components/About/InstanceContactLink.vue +++ b/js/src/components/About/InstanceContactLink.vue @@ -1,9 +1,9 @@ diff --git a/js/src/components/Account/ActorCard.vue b/js/src/components/Account/ActorCard.vue index 4b7a9b11a..d319bd898 100644 --- a/js/src/components/Account/ActorCard.vue +++ b/js/src/components/Account/ActorCard.vue @@ -12,7 +12,7 @@ {{ actor.name || `@${usernameWithDomain(actor)}` }}

- @{{ usernameWithDomain(actor) }} + @{{ usernameWithDomain(actor) }}

{{ comment.actor.name }} - @{{ usernameWithDomain(comment.actor) }} + @{{ usernameWithDomain(comment.actor) }} {{ $t("[deleted]") }} @@ -128,7 +128,7 @@
{{ currentActor.name }} - @{{ currentActor.preferredUsername }} + @{{ currentActor.preferredUsername }}
diff --git a/js/src/components/Event/EventMetadataList.vue b/js/src/components/Event/EventMetadataList.vue index 9868cbedd..c43bd70cf 100644 --- a/js/src/components/Event/EventMetadataList.vue +++ b/js/src/components/Event/EventMetadataList.vue @@ -25,6 +25,7 @@ :placeholder="$t('e.g. Accessibility, Twitch, PeerTube')" id="event-metadata-autocomplete" @select="(option) => addElement(option)" + dir="auto" >