mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 11:48:06 +01:00
Fix ISO code for Canadian French (#26015)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
5dc634796a
commit
173953c23e
11 changed files with 41 additions and 9 deletions
|
@ -224,7 +224,7 @@ module LanguagesHelper
|
||||||
'en-GB': 'English (British)',
|
'en-GB': 'English (British)',
|
||||||
'es-AR': 'Español (Argentina)',
|
'es-AR': 'Español (Argentina)',
|
||||||
'es-MX': 'Español (México)',
|
'es-MX': 'Español (México)',
|
||||||
'fr-QC': 'Français (Canadien)',
|
'fr-CA': 'Français (Canadien)',
|
||||||
'pt-BR': 'Português (Brasil)',
|
'pt-BR': 'Português (Brasil)',
|
||||||
'pt-PT': 'Português (Portugal)',
|
'pt-PT': 'Português (Portugal)',
|
||||||
'sr-Latn': 'Srpski (latinica)',
|
'sr-Latn': 'Srpski (latinica)',
|
||||||
|
|
|
@ -31,7 +31,7 @@ Rails.application.configure do
|
||||||
:fi,
|
:fi,
|
||||||
:fo,
|
:fo,
|
||||||
:fr,
|
:fr,
|
||||||
:'fr-QC',
|
:'fr-CA',
|
||||||
:fy,
|
:fy,
|
||||||
:ga,
|
:ga,
|
||||||
:gd,
|
:gd,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
fr-QC:
|
fr-CA:
|
||||||
activerecord:
|
activerecord:
|
||||||
attributes:
|
attributes:
|
||||||
poll:
|
poll:
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
fr-QC:
|
fr-CA:
|
||||||
devise:
|
devise:
|
||||||
confirmations:
|
confirmations:
|
||||||
confirmed: Votre adresse de courriel a été validée avec succès.
|
confirmed: Votre adresse de courriel a été validée avec succès.
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
fr-QC:
|
fr-CA:
|
||||||
activerecord:
|
activerecord:
|
||||||
attributes:
|
attributes:
|
||||||
doorkeeper/application:
|
doorkeeper/application:
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
fr-QC:
|
fr-CA:
|
||||||
about:
|
about:
|
||||||
about_mastodon_html: 'Le réseau social de l''avenir : pas de publicité, pas de surveillance institutionnelle, conception éthique et décentralisation ! Gardez le contrôle de vos données avec Mastodon !'
|
about_mastodon_html: 'Le réseau social de l''avenir : pas de publicité, pas de surveillance institutionnelle, conception éthique et décentralisation ! Gardez le contrôle de vos données avec Mastodon !'
|
||||||
contact_missing: Non défini
|
contact_missing: Non défini
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
fr-QC:
|
fr-CA:
|
||||||
simple_form:
|
simple_form:
|
||||||
hints:
|
hints:
|
||||||
account:
|
account:
|
21
db/migrate/20240109103012_fix_canadian_french_locale.rb
Normal file
21
db/migrate/20240109103012_fix_canadian_french_locale.rb
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class FixCanadianFrenchLocale < ActiveRecord::Migration[7.0]
|
||||||
|
class User < ApplicationRecord
|
||||||
|
# Dummy class, to make migration possible across version changes
|
||||||
|
end
|
||||||
|
|
||||||
|
disable_ddl_transaction!
|
||||||
|
|
||||||
|
def up
|
||||||
|
User.where(locale: 'fr-QC').in_batches do |users|
|
||||||
|
users.update_all(locale: 'fr-CA')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
User.where(locale: 'fr-CA').in_batches do |users|
|
||||||
|
users.update_all(locale: 'fr-QC')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[7.1].define(version: 2023_12_22_100226) do
|
ActiveRecord::Schema[7.1].define(version: 2024_01_09_103012) do
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,11 @@ namespace :tests do
|
||||||
puts 'Default posting language not migrated as expected for kmr users'
|
puts 'Default posting language not migrated as expected for kmr users'
|
||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
unless Account.find_local('qcuser').user.locale == 'fr-CA'
|
||||||
|
puts 'Locale for fr-QC users not updated to fr-CA as expected'
|
||||||
|
exit(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Populate the database with test data for 2.4.3'
|
desc 'Populate the database with test data for 2.4.3'
|
||||||
|
@ -142,13 +147,19 @@ namespace :tests do
|
||||||
INSERT INTO "accounts"
|
INSERT INTO "accounts"
|
||||||
(id, username, domain, private_key, public_key, created_at, updated_at)
|
(id, username, domain, private_key, public_key, created_at, updated_at)
|
||||||
VALUES
|
VALUES
|
||||||
(10, 'kmruser', NULL, #{user_private_key}, #{user_public_key}, now(), now());
|
(10, 'kmruser', NULL, #{user_private_key}, #{user_public_key}, now(), now()),
|
||||||
|
(11, 'qcuser', NULL, #{user_private_key}, #{user_public_key}, now(), now());
|
||||||
|
|
||||||
INSERT INTO "users"
|
INSERT INTO "users"
|
||||||
(id, account_id, email, created_at, updated_at, admin, locale, chosen_languages)
|
(id, account_id, email, created_at, updated_at, admin, locale, chosen_languages)
|
||||||
VALUES
|
VALUES
|
||||||
(4, 10, 'kmruser@localhost', now(), now(), false, 'ku', '{en,kmr,ku,ckb}');
|
(4, 10, 'kmruser@localhost', now(), now(), false, 'ku', '{en,kmr,ku,ckb}');
|
||||||
|
|
||||||
|
INSERT INTO "users"
|
||||||
|
(id, account_id, email, created_at, updated_at, locale)
|
||||||
|
VALUES
|
||||||
|
(5, 11, 'qcuser@localhost', now(), now(), 'fr-QC');
|
||||||
|
|
||||||
INSERT INTO "settings"
|
INSERT INTO "settings"
|
||||||
(id, thing_type, thing_id, var, value, created_at, updated_at)
|
(id, thing_type, thing_id, var, value, created_at, updated_at)
|
||||||
VALUES
|
VALUES
|
||||||
|
|
Loading…
Reference in a new issue