Skip to content

A platform for community discussion. Free, open, simple.

FEATURE: Add English (UK) as locale (#11768)

Gerhard Schlager3b2f6e129ae6
diff --git a/app/assets/javascripts/discourse/tests/fixtures/about.js b/app/assets/javascripts/discourse/tests/fixtures/about.js
index 4c7de6a87a3..ec7a96fdffe 100644
--- a/app/assets/javascripts/discourse/tests/fixtures/about.js
+++ b/app/assets/javascripts/discourse/tests/fixtures/about.js
@@ -16,12 +16,12 @@ export default {
active_users_30_days: 2026,
like_count: 499135,
likes_7_days: 3449,
- likes_30_days: 12313
+ likes_30_days: 12313,
},
description:
"Discussion about the next-generation open source Discourse forum software",
title: "QUnit Discourse Tests",
- locale: "en_US",
+ locale: "en",
version: "2.2.0.beta8",
https: true,
admins: [
@@ -32,7 +32,7 @@ export default {
avatar_template:
"/user_avatar/meta.discourse.org/sam/{size}/102149_2.png",
title: "co-founder",
- last_seen_at: "2030-01-15T13:30:43.272Z"
+ last_seen_at: "2030-01-15T13:30:43.272Z",
},
{
id: 32,
@@ -41,7 +41,7 @@ export default {
avatar_template:
"/user_avatar/meta.discourse.org/codinghorror/{size}/110067_2.png",
title: "co-founder",
- last_seen_at: "2030-01-15T13:21:56.592Z"
+ last_seen_at: "2030-01-15T13:21:56.592Z",
},
{
id: 19,
@@ -50,8 +50,8 @@ export default {
avatar_template:
"/user_avatar/meta.discourse.org/eviltrout/{size}/5275_2.png",
title: "co-founder",
- last_seen_at: "2030-01-14T18:03:08.232Z"
- }
+ last_seen_at: "2030-01-14T18:03:08.232Z",
+ },
],
moderators: [
{
@@ -61,7 +61,7 @@ export default {
avatar_template:
"/user_avatar/meta.discourse.org/sam/{size}/102149_2.png",
title: "co-founder",
- last_seen_at: "2030-01-15T13:30:43.272Z"
+ last_seen_at: "2030-01-15T13:30:43.272Z",
},
{
id: 32,
@@ -70,7 +70,7 @@ export default {
avatar_template:
"/user_avatar/meta.discourse.org/codinghorror/{size}/110067_2.png",
title: "co-founder",
- last_seen_at: "2030-01-15T13:21:56.592Z"
+ last_seen_at: "2030-01-15T13:21:56.592Z",
},
{
id: 19,
@@ -79,9 +79,9 @@ export default {
avatar_template:
"/user_avatar/meta.discourse.org/eviltrout/{size}/5275_2.png",
title: "co-founder",
- last_seen_at: "2030-01-14T18:03:08.232Z"
- }
- ]
- }
- }
+ last_seen_at: "2030-01-14T18:03:08.232Z",
+ },
+ ],
+ },
+ },
};
diff --git a/app/assets/javascripts/discourse/tests/fixtures/user-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/user-fixtures.js
index 6d78f895a22..717142ebafa 100644
--- a/app/assets/javascripts/discourse/tests/fixtures/user-fixtures.js
+++ b/app/assets/javascripts/discourse/tests/fixtures/user-fixtures.js
@@ -7,7 +7,7 @@ export default {
granted_at: "2014-05-16T02:39:38.388Z",
badge_id: 4,
user_id: 19,
- granted_by_id: -1
+ granted_by_id: -1,
},
{
id: 40673,
@@ -17,15 +17,15 @@ export default {
badge_id: 23,
user_id: 19,
granted_by_id: -1,
- topic_id: 3153
+ topic_id: 3153,
},
{
id: 5868,
granted_at: "2014-05-16T02:39:38.380Z",
badge_id: 3,
user_id: 19,
- granted_by_id: -1
- }
+ granted_by_id: -1,
+ },
],
badges: [
{
@@ -41,7 +41,7 @@ export default {
enabled: true,
badge_grouping_id: 4,
system: true,
- badge_type_id: 1
+ badge_type_id: 1,
},
{
id: 23,
@@ -56,7 +56,7 @@ export default {
enabled: true,
badge_grouping_id: 2,
system: true,
- badge_type_id: 1
+ badge_type_id: 1,
},
{
id: 3,
@@ -71,13 +71,13 @@ export default {
enabled: true,
badge_grouping_id: 4,
system: true,
- badge_type_id: 2
- }
+ badge_type_id: 2,
+ },
],
badge_types: [
{ id: 1, name: "Gold", sort_order: 9 },
{ id: 2, name: "Silver", sort_order: 8 },
- { id: 3, name: "Bronze", sort_order: 7 }
+ { id: 3, name: "Bronze", sort_order: 7 },
],
users: [
{
@@ -85,15 +85,15 @@ export default {
username: "eviltrout",
uploaded_avatar_id: null,
avatar_template:
- "/letter_avatar/eviltrout/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png"
+ "/letter_avatar/eviltrout/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png",
},
{
id: -1,
username: "system",
uploaded_avatar_id: null,
avatar_template:
- "/letter_avatar/system/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png"
- }
+ "/letter_avatar/system/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png",
+ },
],
topics: [
{
@@ -102,12 +102,12 @@ export default {
fancy_title:
"Is it better for Discourse to use JavaScript or CoffeeScript?",
slug: "is-it-better-for-discourse-to-use-javascript-or-coffeescript",
- posts_count: 56
- }
+ posts_count: 56,
+ },
],
user: {
user_option: {
- text_size_seq: 1
+ text_size_seq: 1,
},
id: 19,
username: "eviltrout",
@@ -120,8 +120,8 @@ export default {
{
name: "facebook",
description: "[email protected]",
- can_revoke: true
- }
+ can_revoke: true,
+ },
],
last_posted_at: "2015-05-07T15:23:35.074Z",
last_seen_at: "2015-05-13T14:34:23.188Z",
@@ -147,7 +147,7 @@ export default {
{ action_type: 7, count: 949, id: null },
{ action_type: 9, count: 42, id: null },
{ action_type: 3, count: 8, id: null },
- { action_type: 11, count: 20, id: null }
+ { action_type: 11, count: 20, id: null },
],
can_send_private_messages: true,
can_send_private_message_to_user: false,
@@ -161,7 +161,7 @@ export default {
notification_count: 3244,
has_title_badges: true,
custom_fields: {},
- user_fields: { "1": "33" },
+ user_fields: { 1: "33" },
pending_count: 0,
post_count: 1987,
can_be_deleted: false,
@@ -196,7 +196,7 @@ export default {
username: "sam",
uploaded_avatar_id: null,
avatar_template:
- "/letter_avatar/sam/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png"
+ "/letter_avatar/sam/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png",
},
custom_groups: [
{
@@ -208,7 +208,7 @@ export default {
visible: true,
automatic_membership_email_domains: null,
primary_group: false,
- title: null
+ title: null,
},
{
id: 47,
@@ -219,8 +219,8 @@ export default {
visible: true,
automatic_membership_email_domains: null,
primary_group: false,
- title: null
- }
+ title: null,
+ },
],
featured_user_badge_ids: [5870, 40673, 5868],
card_badge: {
@@ -237,7 +237,7 @@ export default {
enabled: false,
badge_grouping_id: 8,
system: false,
- badge_type_id: 3
+ badge_type_id: 3,
},
user_auth_tokens: [
{
@@ -250,7 +250,7 @@ export default {
icon: "fab-linux",
created_at: "2018-09-08T21:22:56.225Z",
seen_at: "2018-09-08T21:22:56.512Z",
- is_active: false
+ is_active: false,
},
{
id: 3,
@@ -262,7 +262,7 @@ export default {
icon: "fab-linux",
created_at: "2018-09-08T21:33:41.616Z",
seen_at: "2018-09-08T21:33:42.209Z",
- is_active: true
+ is_active: true,
},
{
id: 6,
@@ -274,8 +274,8 @@ export default {
icon: "fab-windows",
created_at: "2018-09-07T21:44:41.616Z",
seen_at: "2018-09-08T21:44:42.209Z",
- is_active: false
- }
+ is_active: false,
+ },
],
user_notification_schedule: {
enabled: false,
@@ -293,8 +293,8 @@ export default {
day_5_end_time: 1020,
day_6_start_time: 480,
day_6_end_time: 1020,
- }
- }
+ },
+ },
},
"/u/eviltrout/card.json": {
user_badges: [
@@ -303,7 +303,7 @@ export default {
granted_at: "2014-05-16T02:39:38.388Z",
badge_id: 4,
user_id: 19,
- granted_by_id: -1
+ granted_by_id: -1,
},
{
id: 40673,
@@ -313,15 +313,15 @@ export default {
badge_id: 23,
user_id: 19,
granted_by_id: -1,
- topic_id: 3153
+ topic_id: 3153,
},
{
id: 5868,
granted_at: "2014-05-16T02:39:38.380Z",
badge_id: 3,
user_id: 19,
- granted_by_id: -1
- }
+ granted_by_id: -1,
+ },
],
badges: [
{
@@ -337,7 +337,7 @@ export default {
enabled: true,
badge_grouping_id: 4,
system: true,
- badge_type_id: 1
+ badge_type_id: 1,
},
{
id: 23,
@@ -352,7 +352,7 @@ export default {
enabled: true,
badge_grouping_id: 2,
system: true,
- badge_type_id: 1
+ badge_type_id: 1,
},
{
id: 3,
@@ -367,13 +367,13 @@ export default {
enabled: true,
badge_grouping_id: 4,
system: true,
- badge_type_id: 2
- }
+ badge_type_id: 2,
+ },
],
badge_types: [
{ id: 1, name: "Gold", sort_order: 9 },
{ id: 2, name: "Silver", sort_order: 8 },
- { id: 3, name: "Bronze", sort_order: 7 }
+ { id: 3, name: "Bronze", sort_order: 7 },
],
users: [
{
@@ -381,15 +381,15 @@ export default {
username: "eviltrout",
uploaded_avatar_id: null,
avatar_template:
- "/letter_avatar/eviltrout/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png"
+ "/letter_avatar/eviltrout/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png",
},
{
id: -1,
username: "system",
uploaded_avatar_id: null,
avatar_template:
- "/letter_avatar/system/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png"
- }
+ "/letter_avatar/system/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png",
+ },
],
user: {
id: 19,
@@ -412,8 +412,8 @@ export default {
'<p>Co-founder of Discourse. Previously, I created <a href="http://forumwarz.com">Forumwarz</a>. <a href="https://twitter.com/eviltrout">Follow me on Twitter</a>. I am <a class="mention" href="/u/eviltrout">@eviltrout</a>.</p>',
website: "http://eviltrout.com",
location: "Toronto",
- featured_user_badge_ids: [5870, 40673, 5868]
- }
+ featured_user_badge_ids: [5870, 40673, 5868],
+ },
},
"/u/eviltrout/bookmarks.json": {
user_bookmark_list: {
@@ -441,10 +441,10 @@ export default {
post_user_username: "someguy",
post_user_name: "Some Guy",
post_user_avatar_template:
- "/letter_avatar/someguy/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png"
- }
- ]
- }
+ "/letter_avatar/someguy/{size}/3_f9720745f5ce6dfc2b5641fca999d934.png",
+ },
+ ],
+ },
},
"/user_actions.json": {
user_actions: [
@@ -474,7 +474,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -504,7 +504,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -534,7 +534,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 6,
@@ -562,7 +562,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -590,7 +590,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -618,7 +618,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -646,7 +646,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -674,7 +674,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -702,7 +702,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -730,7 +730,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -758,7 +758,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 6,
@@ -786,7 +786,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -814,7 +814,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -842,7 +842,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -870,7 +870,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -898,7 +898,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -928,7 +928,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -955,7 +955,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 6,
@@ -983,7 +983,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 6,
@@ -1011,7 +1011,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -1039,7 +1039,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: true,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -1067,7 +1067,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -1097,7 +1097,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1125,7 +1125,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 6,
@@ -1155,7 +1155,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -1185,7 +1185,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 6,
@@ -1213,7 +1213,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -1242,7 +1242,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -1272,7 +1272,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -1302,7 +1302,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -1330,7 +1330,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -1360,7 +1360,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -1390,7 +1390,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -1420,7 +1420,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -1450,7 +1450,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -1478,7 +1478,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1506,7 +1506,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -1536,7 +1536,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -1566,7 +1566,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -1596,7 +1596,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 5,
@@ -1624,7 +1624,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1652,7 +1652,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1680,7 +1680,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1710,7 +1710,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1740,7 +1740,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1768,7 +1768,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 6,
@@ -1794,7 +1794,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1822,7 +1822,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1850,7 +1850,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1878,7 +1878,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1908,7 +1908,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 7,
@@ -1936,7 +1936,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 1,
@@ -1964,7 +1964,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -1992,7 +1992,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -2020,7 +2020,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -2048,7 +2048,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -2076,7 +2076,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -2104,7 +2104,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 6,
@@ -2130,7 +2130,7 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
+ edit_reason: null,
},
{
action_type: 2,
@@ -2156,9 +2156,9 @@ export default {
deleted: false,
hidden: false,
moderator_action: false,
- edit_reason: null
- }
- ]
+ edit_reason: null,
+ },
+ ],
},
"/topics/created-by/eviltrout.json": {
users: [
@@ -2166,56 +2166,56 @@ export default {
id: 19,
username: "eviltrout",
avatar_template:
- "//www.gravatar.com/avatar/c6e17f2ae2a215e87ff9e878a4e63cd9.png?s={size}&r=pg&d=identicon"
+ "//www.gravatar.com/avatar/c6e17f2ae2a215e87ff9e878a4e63cd9.png?s={size}&r=pg&d=identicon",
},
{
id: 5460,
username: "ned",
- avatar_template: "/images/avatar.png"
+ avatar_template: "/images/avatar.png",
},
{
id: 402,
username: "thebrianbarlow",
- avatar_template: "/images/avatar.png"
+ avatar_template: "/images/avatar.png",
},
{
id: 5707,
username: "trident",
- avatar_template: "/images/avatar.png"
+ avatar_template: "/images/avatar.png",
},
{
id: 32,
username: "codinghorror",
- avatar_template: "/images/avatar.png"
+ avatar_template: "/images/avatar.png",
},
{
id: 1995,
username: "zogstrip",
- avatar_template: "/images/avatar.png"
+ avatar_template: "/images/avatar.png",
},
{
id: 2702,
username: "ryanflorence",
- avatar_template: "/images/avatar.png"
+ avatar_template: "/images/avatar.png",
},
{
id: 9,
username: "tms",
avatar_template:
- "//www.gravatar.com/avatar/3981cd271c302f5cba628c6b6d2b32ee.png?s={size}&r=pg&d=identicon"
+ "//www.gravatar.com/avatar/3981cd271c302f5cba628c6b6d2b32ee.png?s={size}&r=pg&d=identicon",
},
{
id: 1,
username: "sam",
avatar_template:
- "//www.gravatar.com/avatar/3dcae8378d46c244172a115c28ca49ce.png?s={size}&r=pg&d=identicon"
+ "//www.gravatar.com/avatar/3dcae8378d46c244172a115c28ca49ce.png?s={size}&r=pg&d=identicon",
},
{
id: 2636,
username: "lonnon",
avatar_template:
- "//www.gravatar.com/avatar/9489ef302fbff6c19bba507d09f8cd1d.png?s={size}&r=pg&d=identicon"
- }
+ "//www.gravatar.com/avatar/9489ef302fbff6c19bba507d09f8cd1d.png?s={size}&r=pg&d=identicon",
+ },
],
topic_list: {
can_create_topic: false,
@@ -2255,9 +2255,9 @@ export default {
{
extras: "latest",
description: "Most Recent Poster",
- user_id: 32
- }
- ]
+ user_id: 32,
+ },
+ ],
},
{
id: 9318,
@@ -2287,9 +2287,9 @@ export default {
{
extras: "latest",
description: "Original Poster, Most Recent Poster",
- user_id: 19
- }
- ]
+ user_id: 19,
+ },
+ ],
},
{
id: 7019,
@@ -2319,11 +2319,11 @@ export default {
{
extras: "latest",
description: "Original Poster, Most Recent Poster",
- user_id: 19
+ user_id: 19,
},
{ extras: null, description: "Most Posts", user_id: 1995 },
- { extras: null, description: "Frequent Poster", user_id: 2702 }
- ]
+ { extras: null, description: "Frequent Poster", user_id: 2702 },
+ ],
},
{
id: 4650,
@@ -2354,8 +2354,8 @@ export default {
{ extras: null, description: "Most Posts", user_id: 9 },
{ extras: null, description: "Frequent Poster", user_id: 1995 },
{ extras: null, description: "Frequent Poster", user_id: 32 },
- { extras: "latest", description: "Most Recent Poster", user_id: 1 }
- ]
+ { extras: "latest", description: "Most Recent Poster", user_id: 1 },
+ ],
},
{
id: 4960,
@@ -2388,9 +2388,9 @@ export default {
{
extras: "latest",
description: "Most Recent Poster",
- user_id: 1995
- }
- ]
+ user_id: 1995,
+ },
+ ],
},
{
id: 2918,
@@ -2420,13 +2420,13 @@ export default {
{
extras: "latest",
description: "Original Poster, Most Recent Poster",
- user_id: 19
+ user_id: 19,
},
- { extras: null, description: "Most Posts", user_id: 2636 }
- ]
- }
- ]
- }
+ { extras: null, description: "Most Posts", user_id: 2636 },
+ ],
+ },
+ ],
+ },
},
"/u/charlie.json": {
user_badges: [
@@ -2436,8 +2436,8 @@ export default {
count: 1,
badge_id: 3,
user_id: 5,
- granted_by_id: -1
- }
+ granted_by_id: -1,
+ },
],
badges: [
{
@@ -2456,8 +2456,8 @@ export default {
system: true,
slug: "regular",
manually_grantable: false,
- badge_type_id: 2
- }
+ badge_type_id: 2,
+ },
],
badge_types: [{ id: 2, name: "Silver", sort_order: 8 }],
users: [
@@ -2467,7 +2467,7 @@ export default {
name: null,
avatar_template: "/letter_avatar_proxy/v3/letter/c/d6d6ee/{size}.png",
moderator: false,
- admin: false
+ admin: false,
},
{
id: -1,
@@ -2475,8 +2475,8 @@ export default {
name: "system",
avatar_template: "/user_avatar/localhost/system/{size}/2_2.png",
moderator: true,
- admin: true
- }
+ admin: true,
+ },
],
user: {
id: 5,
@@ -2561,7 +2561,7 @@ export default {
allow_membership_requests: false,
full_name: null,
default_notification_level: 3,
- membership_request_template: null
+ membership_request_template: null,
},
{
id: 11,
@@ -2588,7 +2588,7 @@ export default {
allow_membership_requests: false,
full_name: null,
default_notification_level: 3,
- membership_request_template: null
+ membership_request_template: null,
},
{
id: 12,
@@ -2615,7 +2615,7 @@ export default {
allow_membership_requests: false,
full_name: null,
default_notification_level: 3,
- membership_request_template: null
+ membership_request_template: null,
},
{
id: 13,
@@ -2642,14 +2642,14 @@ export default {
allow_membership_requests: false,
full_name: null,
default_notification_level: 3,
- membership_request_template: null
- }
+ membership_request_template: null,
+ },
],
group_users: [
{ group_id: 10, user_id: 5, notification_level: 3 },
{ group_id: 11, user_id: 5, notification_level: 3 },
{ group_id: 12, user_id: 5, notification_level: 3 },
- { group_id: 13, user_id: 5, notification_level: 3 }
+ { group_id: 13, user_id: 5, notification_level: 3 },
],
featured_user_badge_ids: [17],
user_option: {
@@ -2678,9 +2678,9 @@ export default {
homepage_id: null,
hide_profile_and_presence: false,
text_size: "normal",
- text_size_seq: 0
- }
- }
+ text_size_seq: 0,
+ },
+ },
},
"/u/charlie/card.json": {
user_badges: [
@@ -2690,8 +2690,8 @@ export default {
count: 1,
badge_id: 3,
user_id: 5,
- granted_by_id: -1
- }
+ granted_by_id: -1,
+ },
],
badges: [
{
@@ -2710,8 +2710,8 @@ export default {
system: true,
slug: "regular",
manually_grantable: false,
- badge_type_id: 2
- }
+ badge_type_id: 2,
+ },
],
badge_types: [{ id: 2, name: "Silver", sort_order: 8 }],
users: [
@@ -2721,7 +2721,7 @@ export default {
name: null,
avatar_template: "/letter_avatar_proxy/v3/letter/c/d6d6ee/{size}.png",
moderator: false,
- admin: false
+ admin: false,
},
{
id: -1,
@@ -2729,8 +2729,8 @@ export default {
name: "system",
avatar_template: "/user_avatar/localhost/system/{size}/2_2.png",
moderator: true,
- admin: true
- }
+ admin: true,
+ },
],
user: {
id: 5,
@@ -2757,8 +2757,8 @@ export default {
primary_group_flair_bg_color: null,
primary_group_flair_color: null,
staged: false,
- featured_user_badge_ids: [17]
- }
+ featured_user_badge_ids: [17],
+ },
},
"/u/charlie/summary.json": {
topics: [],
@@ -2779,8 +2779,8 @@ export default {
system: true,
slug: "regular",
manually_grantable: false,
- badge_type_id: 2
- }
+ badge_type_id: 2,
+ },
],
badge_types: [{ id: 2, name: "Silver", sort_order: 8 }],
users: [
@@ -2790,7 +2790,7 @@ export default {
name: null,
avatar_template: "/letter_avatar_proxy/v3/letter/c/d6d6ee/{size}.png",
moderator: false,
- admin: false
+ admin: false,
},
{
id: -1,
@@ -2798,8 +2798,8 @@ export default {
name: "system",
avatar_template: "/user_avatar/localhost/system/{size}/2_2.png",
moderator: true,
- admin: true
- }
+ admin: true,
+ },
],
user_summary: {
likes_given: 0,
@@ -2824,11 +2824,11 @@ export default {
count: 1,
badge_id: 3,
user_id: 5,
- granted_by_id: -1
- }
+ granted_by_id: -1,
+ },
],
- top_categories: []
- }
+ top_categories: [],
+ },
},
"/u/%E3%83%A9%E3%82%A4%E3%82%AA%E3%83%B3.json": {
user_badges: [],
@@ -2874,7 +2874,7 @@ export default {
second_factor_enabled: false,
second_factor_backup_enabled: false,
associated_accounts: [],
- locale: "en_US",
+ locale: "en",
muted_category_ids: [],
regular_category_ids: [],
watched_tags: [],
@@ -2903,8 +2903,8 @@ export default {
icon: "fab-linux",
created_at: "2019-06-26T08:41:18.436Z",
seen_at: "2019-06-26T09:24:24.683Z",
- is_active: true
- }
+ is_active: true,
+ },
],
invited_by: null,
groups: [
@@ -2931,7 +2931,7 @@ export default {
allow_membership_requests: false,
full_name: null,
default_notification_level: 3,
- membership_request_template: null
+ membership_request_template: null,
},
{
id: 11,
@@ -2956,12 +2956,12 @@ export default {
allow_membership_requests: false,
full_name: null,
default_notification_level: 3,
- membership_request_template: null
- }
+ membership_request_template: null,
+ },
],
group_users: [
{ group_id: 10, user_id: 2, notification_level: 3, owner: false },
- { group_id: 11, user_id: 2, notification_level: 3, owner: false }
+ { group_id: 11, user_id: 2, notification_level: 3, owner: false },
],
featured_user_badge_ids: [],
user_option: {
@@ -2992,9 +2992,9 @@ export default {
hide_profile_and_presence: false,
text_size: "normal",
text_size_seq: 0,
- title_count_mode: "notifications"
- }
- }
+ title_count_mode: "notifications",
+ },
+ },
},
"/u/%E3%83%A9%E3%82%A4%E3%82%AA%E3%83%B3/summary.json": {
topics: [],
@@ -3016,7 +3016,7 @@ export default {
most_liked_users: [],
most_replied_to_users: [],
badges: [],
- top_categories: []
- }
- }
+ top_categories: [],
+ },
+ },
};
diff --git a/app/assets/javascripts/discourse/tests/integration/components/d-editor-test.js b/app/assets/javascripts/discourse/tests/integration/components/d-editor-test.js
index cf87c4ef460..2503f89da92 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/d-editor-test.js
+++ b/app/assets/javascripts/discourse/tests/integration/components/d-editor-test.js
@@ -608,7 +608,7 @@ third line`
template: "{{d-editor value=value}}",
beforeEach() {
this.siteSettings.support_mixed_text_direction = true;
- this.siteSettings.default_locale = "en_US";
+ this.siteSettings.default_locale = "en";
},
async test(assert) {
@@ -622,7 +622,7 @@ third line`
template: "{{d-editor value=value}}",
beforeEach() {
this.siteSettings.support_mixed_text_direction = true;
- this.siteSettings.default_locale = "en_US";
+ this.siteSettings.default_locale = "en";
},
async test(assert) {
diff --git a/app/assets/javascripts/discourse/tests/integration/components/select-kit/dropdown-select-box-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/dropdown-select-box-test.js
index 01ddec94dcc..b7e8247b27f 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/select-kit/dropdown-select-box-test.js
+++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/dropdown-select-box-test.js
@@ -88,7 +88,7 @@ discourseModule(
assert.equal(
this.subject.header().el().attr("title"),
- "[en_US.test_none]",
+ "[en.test_none]",
"it adds a title attribute to the button"
);
},
diff --git a/app/assets/javascripts/discourse/tests/test_helper.js b/app/assets/javascripts/discourse/tests/test_helper.js
index 610c363a95e..0de51eb3c71 100644
--- a/app/assets/javascripts/discourse/tests/test_helper.js
+++ b/app/assets/javascripts/discourse/tests/test_helper.js
@@ -11,7 +11,7 @@
//= require route-recognizer
//= require pretender/pretender
//= require locales/i18n
-//= require locales/en_US
+//= require locales/en
//= require discourse-loader
// Our base application
diff --git a/app/assets/javascripts/locales/en_GB.js.erb b/app/assets/javascripts/locales/en_GB.js.erb
new file mode 100644
index 00000000000..cc7502dcd0f
--- /dev/null
+++ b/app/assets/javascripts/locales/en_GB.js.erb
@@ -0,0 +1,6 @@
+//= depend_on 'client.en_GB.yml'
+//= depend_on 'client.en.yml'
+//= require locales/i18n
+
+<% JsLocaleHelper.reloadable_plugins(:en_GB, self) %>
+<%= JsLocaleHelper.output_locale(:en_GB) %>
diff --git a/app/assets/javascripts/locales/en_US.js.erb b/app/assets/javascripts/locales/en_US.js.erb
deleted file mode 100644
index 572777e23cc..00000000000
--- a/app/assets/javascripts/locales/en_US.js.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-//= depend_on 'client.en_US.yml'
-//= depend_on 'client.en.yml'
-//= require locales/i18n
-
-<% JsLocaleHelper.reloadable_plugins(:en_US, self) %>
-<%= JsLocaleHelper.output_locale(:en_US) %>
diff --git a/app/assets/javascripts/wizard/test/test_helper.js b/app/assets/javascripts/wizard/test/test_helper.js
index 10812eb6bfc..05d0eb3c9f0 100644
--- a/app/assets/javascripts/wizard/test/test_helper.js
+++ b/app/assets/javascripts/wizard/test/test_helper.js
@@ -5,7 +5,7 @@
//= require jquery.debug
//= require ember.debug
//= require locales/i18n
-//= require locales/en_US
+//= require locales/en
//= require route-recognizer/dist/route-recognizer
//= require fake_xml_http_request
//= require pretender/pretender
diff --git a/app/models/locale_site_setting.rb b/app/models/locale_site_setting.rb
index 947fe5724ac..f541a27f488 100644
--- a/app/models/locale_site_setting.rb
+++ b/app/models/locale_site_setting.rb
@@ -56,7 +56,7 @@ class LocaleSiteSetting < EnumSiteSetting
end
FALLBACKS ||= {
- en_US: :en
+ en_GB: :en
}
def self.fallback_locale(locale)
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 5c36c52cc8e..4b9d1a78a4f 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -22,35 +22,35 @@ en:
millions: "%{number}M"
dates:
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- time: "HH:mm"
+ time: "h:mm a"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- time_with_zone: "HH:mm (z)"
+ time_with_zone: "hh:mm a (z)"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- time_short_day: "ddd, HH:mm"
+ time_short_day: "ddd, h:mm a"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
timeline_date: "MMM YYYY"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_no_year: "D MMM, HH:mm"
+ long_no_year: "MMM D, h:mm a"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_no_year_no_time: "D MMM"
+ long_no_year_no_time: "MMM D"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- full_no_year_no_time: "Do MMMM"
+ full_no_year_no_time: "MMMM Do"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_with_year: "D MMM YYYY HH:mm"
+ long_with_year: "MMM D, YYYY h:mm a"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_with_year_no_time: "D MMM YYYY"
+ long_with_year_no_time: "MMM D, YYYY"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- full_with_year_no_time: "D MMMM YYYY"
+ full_with_year_no_time: "MMMM Do, YYYY"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date_with_year: "D MMM 'YY LT"
+ long_date_with_year: "MMM D, 'YY LT"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date_without_year: "D MMM LT"
+ long_date_without_year: "MMM D, LT"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date_with_year_without_time: "D MMM 'YY"
+ long_date_with_year_without_time: "MMM D, 'YY"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date_without_year_with_linebreak: "D MMM <br/>LT"
+ long_date_without_year_with_linebreak: "MMM D <br/>LT"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date_with_year_with_linebreak: "D MMM 'YY <br/>LT"
+ long_date_with_year_with_linebreak: "MMM D, 'YY <br/>LT"
wrap_ago: "%{date} ago"
@@ -87,7 +87,7 @@ en:
one: "%{count}y"
other: "%{count}y"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- date_month: "D MMM"
+ date_month: "MMM D"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
date_year: "MMM 'YY"
medium:
@@ -101,7 +101,7 @@ en:
one: "%{count} day"
other: "%{count} days"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- date_year: "D MMM 'YY"
+ date_year: "MMM D, 'YY"
medium_with_ago:
x_minutes:
one: "%{count} min ago"
diff --git a/config/locales/client.en_US.yml b/config/locales/client.en_GB.yml
similarity index 70%
rename from config/locales/client.en_US.yml
rename to config/locales/client.en_GB.yml
index 889e8c66c92..114e56e8073 100644
--- a/config/locales/client.en_US.yml
+++ b/config/locales/client.en_GB.yml
@@ -1,42 +1,42 @@
-en_US:
+en_GB:
js:
dates:
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- time: "h:mm a"
+ time: "HH:mm"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- time_with_zone: "hh:mm a (z)"
+ time_with_zone: "HH:mm (z)"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- time_short_day: "ddd, h:mm a"
+ time_short_day: "ddd, HH:mm"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
timeline_date: "MMM YYYY"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_no_year: "MMM D, h:mm a"
+ long_no_year: "D MMM, HH:mm"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_no_year_no_time: "MMM D"
+ long_no_year_no_time: "D MMM"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- full_no_year_no_time: "MMMM Do"
+ full_no_year_no_time: "Do MMMM"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_with_year: "MMM D, YYYY h:mm a"
+ long_with_year: "D MMM YYYY HH:mm"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_with_year_no_time: "MMM D, YYYY"
+ long_with_year_no_time: "D MMM YYYY"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- full_with_year_no_time: "MMMM Do, YYYY"
+ full_with_year_no_time: "D MMMM YYYY"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date_with_year: "MMM D, 'YY LT"
+ long_date_with_year: "D MMM 'YY LT"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date_without_year: "MMM D, LT"
+ long_date_without_year: "D MMM LT"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date_with_year_without_time: "MMM D, 'YY"
+ long_date_with_year_without_time: "D MMM 'YY"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date_without_year_with_linebreak: "MMM D <br/>LT"
+ long_date_without_year_with_linebreak: "D MMM <br/>LT"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date_with_year_with_linebreak: "MMM D, 'YY <br/>LT"
+ long_date_with_year_with_linebreak: "D MMM 'YY <br/>LT"
tiny:
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- date_month: "MMM D"
+ date_month: "D MMM"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
date_year: "MMM 'YY"
medium:
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- date_year: "MMM D, 'YY"
+ date_year: "D MMM 'YY"
diff --git a/config/locales/names.yml b/config/locales/names.yml
index c1703bd920f..16901aa97c7 100644
--- a/config/locales/names.yml
+++ b/config/locales/names.yml
@@ -111,11 +111,11 @@ el:
name: Greek
nativeName: ελληνικά
en:
- name: English
- nativeName: English
-en_US:
- name: English (United States)
- nativeName: English (United States)
+ name: English (US)
+ nativeName: English (US)
+en_GB:
+ name: English (UK)
+ nativeName: English (UK)
eo:
name: Esperanto
nativeName: Esperanto
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 34af12f3eb5..51dc4ef42ef 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -3,20 +3,20 @@ en:
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
short_date_no_year: "D MMM"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- short_date: "D MMM YYYY"
+ short_date: "D MMM, YYYY"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date: "D MMMM YYYY LT"
+ long_date: "MMMM D, YYYY h:mma"
datetime_formats: &datetime_formats
formats:
# Format directives: https://ruby-doc.org/core/Time.html#method-i-strftime
- short: "%d-%m-%Y"
+ short: "%m-%d-%Y"
# Format directives: https://ruby-doc.org/core/Time.html#method-i-strftime
- short_no_year: "%-d %B"
+ short_no_year: "%B %-d"
# Format directives: https://ruby-doc.org/core/Time.html#method-i-strftime
- date_only: "%-d %B %Y"
+ date_only: "%B %-d, %Y"
# Format directives: https://ruby-doc.org/core/Time.html#method-i-strftime
- long: "%-d %B %Y %H:%M"
+ long: "%B %-d, %Y, %l:%M%P"
# Format directives: https://ruby-doc.org/core/Time.html#method-i-strftime
no_day: "%B %Y"
date:
@@ -482,7 +482,7 @@ en:
Welcome to %{site_name} &mdash; **thanks for contributing!**
- Be kind to your fellow community members.
-
+
- Does your reply improve the conversation?
- Constructive criticism is welcome, but criticize *ideas*, not people.
@@ -2909,8 +2909,8 @@ en:
We’ve promoted you up another [trust level](https://blog.discourse.org/2018/06/understanding-discourse-trust-levels/)!
As an experienced user, you might appreciate [this list of handy tips and tricks](https://blog.discourse.org/2016/12/discourse-new-user-tips-and-tricks/).
-
- We invite you to keep getting involved – we enjoy having you around.
+
+ We invite you to keep getting involved – we enjoy having you around.
backup_succeeded:
title: "Backup Succeeded"
diff --git a/config/locales/server.en_US.yml b/config/locales/server.en_GB.yml
similarity index 81%
rename from config/locales/server.en_US.yml
rename to config/locales/server.en_GB.yml
index 3b4512908bb..ede1415348f 100644
--- a/config/locales/server.en_US.yml
+++ b/config/locales/server.en_GB.yml
@@ -1,22 +1,22 @@
-en_US:
+en_GB:
dates:
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
short_date_no_year: "D MMM"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- short_date: "D MMM, YYYY"
+ short_date: "D MMM YYYY"
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
- long_date: "MMMM D, YYYY h:mma"
+ long_date: "D MMMM YYYY LT"
datetime_formats: &datetime_formats
formats:
# Format directives: https://ruby-doc.org/core/Time.html#method-i-strftime
- short: "%m-%d-%Y"
+ short: "%d-%m-%Y"
# Format directives: https://ruby-doc.org/core/Time.html#method-i-strftime
- short_no_year: "%B %-d"
+ short_no_year: "%-d %B"
# Format directives: https://ruby-doc.org/core/Time.html#method-i-strftime
- date_only: "%B %-d, %Y"
+ date_only: "%-d %B %Y"
# Format directives: https://ruby-doc.org/core/Time.html#method-i-strftime
- long: "%B %-d, %Y, %l:%M%P"
+ long: "%-d %B %Y %H:%M"
# Format directives: https://ruby-doc.org/core/Time.html#method-i-strftime
no_day: "%B %Y"
date:
diff --git a/config/site_settings.yml b/config/site_settings.yml
index a040983cf4e..fec2ca51949 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -738,7 +738,7 @@ posting:
default: false
locale_default:
en: true
- en_US: true
+ en_GB: true
title_fancy_entities: true
min_personal_message_title_length:
client: true
diff --git a/db/migrate/20210120125607_rename_english_locale.rb b/db/migrate/20210120125607_rename_english_locale.rb
new file mode 100644
index 00000000000..2da72485f1b
--- /dev/null
+++ b/db/migrate/20210120125607_rename_english_locale.rb
@@ -0,0 +1,41 @@
+# frozen_string_literal: true
+
+class RenameEnglishLocale < ActiveRecord::Migration[6.0]
+ def up
+ rename_locale(old: "en", new: "en_GB")
+ rename_locale(old: "en_US", new: "en")
+ end
+
+ def down
+ rename_locale(old: "en", new: "en_US")
+ rename_locale(old: "en_GB", new: "en")
+ end
+
+ private
+
+ def rename_locale(old:, new:)
+ execute <<~SQL
+ UPDATE users
+ SET locale = '#{new}'
+ WHERE locale = '#{old}'
+ SQL
+
+ execute <<~SQL
+ UPDATE site_settings
+ SET value = '#{new}'
+ WHERE name = 'default_locale' AND value = '#{old}'
+ SQL
+
+ execute <<~SQL
+ UPDATE translation_overrides
+ SET locale = '#{new}'
+ WHERE locale = '#{old}'
+ SQL
+
+ execute <<~SQL
+ UPDATE theme_translation_overrides
+ SET locale = '#{new}'
+ WHERE locale = '#{old}'
+ SQL
+ end
+end
diff --git a/lib/js_locale_helper.rb b/lib/js_locale_helper.rb
index d15ad161e19..40614fbd0db 100644
--- a/lib/js_locale_helper.rb
+++ b/lib/js_locale_helper.rb
@@ -195,8 +195,7 @@ module JsLocaleHelper
end
MOMENT_LOCALE_MAPPING ||= {
- "hy" => "hy-am",
- "en" => "en-gb"
+ "hy" => "hy-am"
}
def self.find_moment_locale(locale_chain, timezone_names: false)
@@ -213,7 +212,6 @@ module JsLocaleHelper
# moment.js uses a different naming scheme for locale files
locale.tr('_', '-').downcase
end
-
end
def self.find_message_format_locale(locale_chain, fallback_to_english:)
diff --git a/lib/site_settings/defaults_provider.rb b/lib/site_settings/defaults_provider.rb
index 1a4ac02a837..9ebae9aa512 100644
--- a/lib/site_settings/defaults_provider.rb
+++ b/lib/site_settings/defaults_provider.rb
@@ -4,7 +4,7 @@ module SiteSettings; end
# A cache for providing default value based on site locale
class SiteSettings::DefaultsProvider
- DEFAULT_LOCALE = 'en_US'
+ DEFAULT_LOCALE = 'en'
def initialize(site_setting)
@site_setting = site_setting
diff --git a/spec/components/freedom_patches/translate_accelerator_spec.rb b/spec/components/freedom_patches/translate_accelerator_spec.rb
index 930e4b3370e..ba4d377261b 100644
--- a/spec/components/freedom_patches/translate_accelerator_spec.rb
+++ b/spec/components/freedom_patches/translate_accelerator_spec.rb
@@ -30,7 +30,7 @@ describe "translate accelerator" do
orig = I18n.t('i_am_an_unknown_key99')
expect(I18n.t('i_am_an_unknown_key99').object_id).to eq(orig.object_id)
- expect(I18n.t('i_am_an_unknown_key99')).to eq("translation missing: en_US.i_am_an_unknown_key99")
+ expect(I18n.t('i_am_an_unknown_key99')).to eq("translation missing: en.i_am_an_unknown_key99")
end
it "returns the correct language" do
@@ -173,10 +173,10 @@ describe "translate accelerator" do
end
it "supports one and other with fallback locale" do
- override_translation('en_US', 'items.one', 'one fish')
- override_translation('en_US', 'items.other', '%{count} fishies')
+ override_translation('en_GB', 'items.one', 'one fish')
+ override_translation('en_GB', 'items.other', '%{count} fishies')
- I18n.with_locale(:en_US) do
+ I18n.with_locale(:en_GB) do
expect(I18n.t('items', count: 13)).to eq('13 fishies')
expect(I18n.t('items', count: 1)).to eq('one fish')
end
diff --git a/spec/components/js_locale_helper_spec.rb b/spec/components/js_locale_helper_spec.rb
index 6bce0bd7973..887ae8dc0d9 100644
--- a/spec/components/js_locale_helper_spec.rb
+++ b/spec/components/js_locale_helper_spec.rb
@@ -118,14 +118,14 @@ describe JsLocaleHelper do
expect(message).not_to match 'Plural Function not found'
end
- it "includes uses message formats from fallback locale" do
- translations = JsLocaleHelper.translations_for(:en_US)
- en_us_message_formats = JsLocaleHelper.remove_message_formats!(translations, :en_US)
- expect(en_us_message_formats).to_not be_empty
+ it "uses message formats from fallback locale" do
+ translations = JsLocaleHelper.translations_for(:en_GB)
+ en_gb_message_formats = JsLocaleHelper.remove_message_formats!(translations, :en_GB)
+ expect(en_gb_message_formats).to_not be_empty
translations = JsLocaleHelper.translations_for(:en)
en_message_formats = JsLocaleHelper.remove_message_formats!(translations, :en)
- expect(en_us_message_formats).to eq(en_message_formats)
+ expect(en_gb_message_formats).to eq(en_message_formats)
end
end
@@ -207,12 +207,12 @@ describe JsLocaleHelper do
end
describe ".find_message_format_locale" do
- it "finds locale for en_US" do
- locale, filename = JsLocaleHelper.find_message_format_locale([:en_US], fallback_to_english: false)
+ it "finds locale for en_GB" do
+ locale, filename = JsLocaleHelper.find_message_format_locale([:en_GB], fallback_to_english: false)
expect(locale).to eq("en")
expect(filename).to end_with("/en.js")
- locale, filename = JsLocaleHelper.find_message_format_locale(["en_US"], fallback_to_english: false)
+ locale, filename = JsLocaleHelper.find_message_format_locale(["en_GB"], fallback_to_english: false)
expect(locale).to eq("en")
expect(filename).to end_with("/en.js")
end
diff --git a/spec/components/site_setting_extension_spec.rb b/spec/components/site_setting_extension_spec.rb
index 1b955548cd8..2db0f2c494c 100644
--- a/spec/components/site_setting_extension_spec.rb
+++ b/spec/components/site_setting_extension_spec.rb
@@ -785,7 +785,7 @@ describe SiteSettingExtension do
describe '.default_locale' do
it 'is always loaded' do
- expect(settings.default_locale).to eq('en_US')
+ expect(settings.default_locale).to eq('en')
end
end
diff --git a/spec/lib/i18n/fallback_locale_list_spec.rb b/spec/lib/i18n/fallback_locale_list_spec.rb
index f84a4908aa7..6f4dc348c23 100644
--- a/spec/lib/i18n/fallback_locale_list_spec.rb
+++ b/spec/lib/i18n/fallback_locale_list_spec.rb
@@ -13,11 +13,11 @@ describe I18n::Backend::FallbackLocaleList do
expect(list[:en]).to eq([:en])
end
- it "works when default_locale is English (United States)" do
- SiteSetting.default_locale = :en_US
+ it "works when default_locale is English (UK)" do
+ SiteSetting.default_locale = :en_GB
expect(list[:ru]).to eq([:ru, :en])
- expect(list[:en_US]).to eq([:en_US, :en])
+ expect(list[:en_GB]).to eq([:en_GB, :en])
expect(list[:en]).to eq([:en])
end
@@ -27,7 +27,7 @@ describe I18n::Backend::FallbackLocaleList do
expect(list[:ru]).to eq([:ru, :en])
expect(list[:de]).to eq([:de, :en])
expect(list[:en]).to eq([:en])
- expect(list[:en_US]).to eq([:en_US, :en])
+ expect(list[:en_GB]).to eq([:en_GB, :en])
end
context "when plugin registered fallback locale" do
@@ -50,14 +50,14 @@ describe I18n::Backend::FallbackLocaleList do
expect(list[:en]).to eq([:en])
end
- it "works when default_locale is English (United States)" do
- SiteSetting.default_locale = :en_US
+ it "works when default_locale is English (UK)" do
+ SiteSetting.default_locale = :en_GB
expect(list[:de_AT]).to eq([:de_AT, :de, :en])
expect(list[:"de_AT-formal"]).to eq([:"de_AT-formal", :de_AT, :de, :en])
expect(list[:de]).to eq([:de, :en])
expect(list[:en]).to eq([:en])
- expect(list[:en_US]).to eq([:en_US, :en])
+ expect(list[:en_GB]).to eq([:en_GB, :en])
end
it "works when default_locale is not English" do
diff --git a/spec/lib/search_spec.rb b/spec/lib/search_spec.rb
index 1aaf6edb49e..13ca42582d9 100644
--- a/spec/lib/search_spec.rb
+++ b/spec/lib/search_spec.rb
@@ -22,7 +22,7 @@ describe Search do
it "maps locales to correct Postgres dictionaries" do
expect(Search.ts_config).to eq("english")
expect(Search.ts_config("en")).to eq("english")
- expect(Search.ts_config("en_US")).to eq("english")
+ expect(Search.ts_config("en_GB")).to eq("english")
expect(Search.ts_config("pt_BR")).to eq("portuguese")
expect(Search.ts_config("tr")).to eq("turkish")
expect(Search.ts_config("xx")).to eq("simple")
diff --git a/spec/mailers/user_notifications_spec.rb b/spec/mailers/user_notifications_spec.rb
index 1b422da2c7f..537d10edc5d 100644
--- a/spec/mailers/user_notifications_spec.rb
+++ b/spec/mailers/user_notifications_spec.rb
@@ -1013,7 +1013,7 @@ describe UserNotifications do
let(:locale) { "fr" }
let(:mail_type) { mail_type }
it "sets the locale" do
- expects_build_with(has_entry(:locale, "en_US"))
+ expects_build_with(has_entry(:locale, "en"))
end
end
end
diff --git a/spec/models/locale_site_setting_spec.rb b/spec/models/locale_site_setting_spec.rb
index 75fedf75689..73b1022d682 100644
--- a/spec/models/locale_site_setting_spec.rb
+++ b/spec/models/locale_site_setting_spec.rb
@@ -90,15 +90,15 @@ describe LocaleSiteSetting do
expect(LocaleSiteSetting.fallback_locale('foo')).to be_nil
end
- it 'returns English for English (United States)' do
- expect(LocaleSiteSetting.fallback_locale('en_US')).to eq(:en)
+ it 'returns English for English (UK)' do
+ expect(LocaleSiteSetting.fallback_locale('en_GB')).to eq(:en)
end
end
end
describe '.fallback_locale' do
- it 'returns English for English (United States)' do
- expect(LocaleSiteSetting.fallback_locale('en_US')).to eq(:en)
+ it 'returns English for English (UK)' do
+ expect(LocaleSiteSetting.fallback_locale('en_GB')).to eq(:en)
end
end
end
diff --git a/spec/multisite/site_settings_spec.rb b/spec/multisite/site_settings_spec.rb
index ba0d971bc2f..069c2663524 100644
--- a/spec/multisite/site_settings_spec.rb
+++ b/spec/multisite/site_settings_spec.rb
@@ -15,7 +15,7 @@ RSpec.describe 'Multisite SiteSettings', type: :multisite do
describe '#default_locale' do
it 'should return the right locale' do
test_multisite_connection('default') do
- expect(SiteSetting.default_locale).to eq('en_US')
+ expect(SiteSetting.default_locale).to eq('en')
end
test_multisite_connection('second') do
@@ -25,7 +25,7 @@ RSpec.describe 'Multisite SiteSettings', type: :multisite do
end
test_multisite_connection('default') do
- expect(SiteSetting.default_locale).to eq('en_US')
+ expect(SiteSetting.default_locale).to eq('en')
SiteSetting.default_locale = 'ja'
diff --git a/spec/requests/extra_locales_controller_spec.rb b/spec/requests/extra_locales_controller_spec.rb
index d46f6c71efa..7d81ec890e8 100644
--- a/spec/requests/extra_locales_controller_spec.rb
+++ b/spec/requests/extra_locales_controller_spec.rb
@@ -52,7 +52,7 @@ describe ExtraLocalesController do
before do
JsLocaleHelper.clear_cache!
JsLocaleHelper.expects(:plugin_translations)
- .with(any_of("en", "en_US"))
+ .with(any_of("en", "en_GB"))
.returns("admin_js" => {
"admin" => {
"site_settings" => {
diff --git a/spec/services/badge_granter_spec.rb b/spec/services/badge_granter_spec.rb
index 05f82abcc89..929791eddd8 100644
--- a/spec/services/badge_granter_spec.rb
+++ b/spec/services/badge_granter_spec.rb
@@ -354,7 +354,7 @@ describe BadgeGranter do
it 'removes custom badge titles' do
custom_badge_title = 'this is a badge title'
- TranslationOverride.create!(translation_key: badge.translation_key, value: custom_badge_title, locale: 'en_US')
+ TranslationOverride.create!(translation_key: badge.translation_key, value: custom_badge_title, locale: 'en')
described_class.grant(badge, user)
user.update!(title: custom_badge_title)