# 国旗

**URL:** https://meta.discourse.org/t/national-flags/55969
**Category:** Plugin
**Tags:** broken
**Created:** [2017年一月18日 15:13 UTC](https://meta.discourse.org/t/national-flags/55969 "2017-01-18T15:13:40Z")
**Posts on this page:** 20
**Page:** 6

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2021年三月31日 10:15 UTC](https://meta.discourse.org/t/national-flags/55969/105 "2021-03-31T10:15:41Z")

</div>

各位，@fzngagan 非常慷慨地投入了大量时间，提交了一个 PR 以让该功能在 Custom Wizard 中重新正常运行，我已将其合并。

我已测试过，功能正常，再次感谢 @fzngagan！

> <https://github.com/Ebsy/discourse-nationalflags/pull/16>
>
> Fixes
> \- Moves the flag list to a separate class
> \- Ensures compatibility with l…atest Custom Wizard plugin.

您可能需要更新提交步骤，以下是我的“操作”：

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/6/86fc521f7d7a954fd6fda071bc436ce0ebeb7e9c.png)

在某个时刻，我们应该修复一下当前的 CSS，因为它现在看起来非常非常丑陋。

---

<div class="post-metadata">

### Author: ![Mr.X\_Mr.X](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mr.x_mr.x/32/126610_2.png) [@Mr.X\_Mr.X](https://meta.discourse.org/u/Mr.X_Mr.X)
#### Post date: [2022年二月11日 01:37 UTC](https://meta.discourse.org/t/national-flags/55969/106 "2022-02-11T01:37:49Z")

</div>

是否可以使用此插件配合 rake 命令，根据用户的 IP 地址为其设置标志？许多用户往往没有注意到他们可以设置标志。或者在用户新注册时，根据 IP 地址默认设置一个标志？这对许多社区来说会很有用。

---

<div class="post-metadata">

### Author: ![pawelorzech](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pawelorzech/32/251878_2.png) [@pawelorzech](https://meta.discourse.org/u/pawelorzech)
#### Post date: [2022年三月3日 15:36 UTC](https://meta.discourse.org/t/national-flags/55969/107 "2022-03-03T15:36:10Z")

</div>

由于最新版本未在用户偏好设置中显示，我不得不禁用它。此外，它还隐藏了“保存配置文件”按钮，从而破坏了不同区域的用户偏好设置。供您参考。

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [2023年一月30日 20:07 UTC](https://meta.discourse.org/t/national-flags/55969/108 "2023-01-30T20:07:11Z")

</div>

有人遇到过这个问题吗？更改个人资料中的标志后保存，但实际上并未保存，刷新后选择就消失了。控制台或日志中没有错误。

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2023年一月30日 23:05 UTC](https://meta.discourse.org/t/national-flags/55969/109 "2023-01-30T23:05:45Z")

</div>

对我来说，截至今天早上，测试已通过，工作正常。

---

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [2023年三月11日 15:27 UTC](https://meta.discourse.org/t/national-flags/55969/110 "2023-03-11T15:27:08Z")

</div>

有人尝试过使用这个与美国州旗或类似的东西吗？

---

<div class="post-metadata">

### Author: ![pmcpa](https://avatars.discourse-cdn.com/v4/letter/p/8797f3/32.png) [@pmcpa](https://meta.discourse.org/u/pmcpa)
#### Post date: [2024年一月5日 21:16 UTC](https://meta.discourse.org/t/national-flags/55969/111 "2024-01-05T21:16:28Z")

</div>

看起来这个插件被即将到来的 Discourse 升级到 Ember 5 标记为不兼容。关于更新有什么想法吗？

> [@Preparing for Discourse's upgrade to Ember 5](https://meta.discourse.org/t/preparing-for-discourses-upgrade-to-ember-5/287211):
>
> Discourse will soon be upgrading our version of the Ember Javascript framework from version 3 to version 5. The vast majority of the preparation work is done, and many sites are already running on Ember 5 (including Meta!). ember This upgrade is available behind a feature flag right now! This is the default for self-hosted Discourse installations starting 10th January. Initially, Ember 3 support will remain available via a flag, but will be removed within the first quarter of 2024. On our ma…

---

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [2024年一月9日 02:32 UTC](https://meta.discourse.org/t/national-flags/55969/112 "2024-01-09T02:32:34Z")

</div>

控制台日志中的错误：

> 使用 Ember 全局变量已被弃用。您应该导入 Ember 模块或特定的 API 来代替。 [弃用 ID：ember-global] 有关更多详细信息，请参阅 [Ember.js - Deprecations](https://deprecations.emberjs.com/v3.x/#toc_ember-global%E3%80%82)

已打开问题；也许修复很简单？

> <https://github.com/Ebsy/discourse-nationalflags/issues/26>
>
> After an update to Discourse 3.2.0.beta4, I see a banner warning 
> 
> \> \[Admin No…tice\] One of your themes or plugins needs updating for compatibility with upcoming Discourse core changes (\[more info\](https://meta.discourse.org/t/287211)).
> 
> In the console logs, I see
> 
> \> Usage of the Ember Global is deprecated. You should import the Ember module or the specific API instead. \[deprecation id: ember-global\] See https://deprecations.emberjs.com/v3.x/#toc\_ember-global for more details.
> 
> More information is available here:
> 
> https://meta.discourse.org/t/preparing-for-discourses-upgrade-to-ember-5/287211?u=mcdanlj

---

<div class="post-metadata">

### Author: ![pmcpa](https://avatars.discourse-cdn.com/v4/letter/p/8797f3/32.png) [@pmcpa](https://meta.discourse.org/u/pmcpa)
#### Post date: [2024年一月10日 14:52 UTC](https://meta.discourse.org/t/national-flags/55969/113 "2024-01-10T14:52:53Z")

</div>

请注意，昨晚的 Discourse 更新据说是 Ember 更新。在更新之前，请在您的 containers/app.yml 中禁用此插件，否则您的 Discourse 将只显示加载球，并且您的网站将永远无法加载。

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2024年一月10日 15:34 UTC](https://meta.discourse.org/t/national-flags/55969/114 "2024-01-10T15:34:23Z")

</div>

我已经提交并合并了一个 PR，希望能修复这些关键问题：

> <https://github.com/Ebsy/discourse-nationalflags/pull/27>

请告诉我您的使用情况 👍

---

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [2024年一月11日 02:05 UTC](https://meta.discourse.org/t/national-flags/55969/115 "2024-01-11T02:05:53Z")

</div>

我已经使用最新的 National Flags 插件重建了我的网站，并且运行成功。非常感谢这次更新！❤

---

<div class="post-metadata">

### Author: ![Master](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/master/32/383814_2.png) [@Master](https://meta.discourse.org/u/Master)
#### Post date: [2024年六月4日 03:45 UTC](https://meta.discourse.org/t/national-flags/55969/116 "2024-06-04T03:45:38Z")

</div>

它看起来是空的，并要求我更新

 ![图片显示了一个名为“discourse-r”的插件的设置，该插件允许显示用户的国旗。有一个启用的选项“显示用户的国旗”，以及一个用于输入国旗 ISO 代码的空文本字段，并显示一条消息，指出缺少到西班牙语的翻译“es.site_settings.nationalflag_iso”。 (AI 题注)](https://global.discourse-cdn.com/meta/original/4X/a/d/d/add9a2406e08d1a2591990a58af2b0cee8468d44.jpeg)

@merefield @Ebs

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2024年六月8日 10:11 UTC](https://meta.discourse.org/t/national-flags/55969/117 "2024-06-08T10:11:18Z")

</div>

我不知道为什么会添加那个设置。

也许如果你在使用插件时遇到问题并且需要帮助，可以到 #Marketplace 论坛发帖？

---

<div class="post-metadata">

### Author: ![anon48433008](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anon48433008](https://meta.discourse.org/u/anon48433008)
#### Post date: [2024年七月15日 14:23 UTC](https://meta.discourse.org/t/national-flags/55969/118 "2024-07-15T14:23:02Z")

</div>

> [@sunjam](#):
>
> 美国州旗

@sunjam 你后来找到这个选项了吗？

或者任何人，

我一直在寻找类似这样的选项，但定义更本地化，而不是区域类别。

---

<div class="post-metadata">

### Author: ![Chris\_Lail](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chris_lail/32/199229_2.png) [@Chris\_Lail](https://meta.discourse.org/u/Chris_Lail)
#### Post date: [2024年七月25日 19:25 UTC](https://meta.discourse.org/t/national-flags/55969/119 "2024-07-25T19:25:20Z")

</div>

想添加科索沃国旗。 我可以自己添加；但是，我不知道您从哪里获取的 PNG 文件。 我想保持一致。  
谢谢。

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2024年七月27日 23:30 UTC](https://meta.discourse.org/t/national-flags/55969/120 "2024-07-27T23:30:33Z")

</div>

我不确定在哪里添加到 Discourse。但查看插件 GitHub 页面。它需要被添加。

PNG 存储在此处

> **[discourse-nationalflags/public/images/nationalflags at master ·...](https://github.com/Ebsy/discourse-nationalflags/tree/master/public/images/nationalflags)**
>
> National Flags plugin for Discourse. Contribute to Ebsy/discourse-nationalflags development by creating an account on GitHub.

代码添加在此处

> <https://github.com/Ebsy/discourse-nationalflags/blob/master/config/flags.yml>

如果您懂一些编码，您可以提交一个拉取请求。

@anon48433008 @sunjam 如果您懂一些简单的编码，我认为您可以通过上面两个链接创建一个分支版本。您可能需要查看一些其他的 yml 文件以及其他代码部分，以更改用户偏好设置页面的提示名称，使其显示为 USA States Flags。

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2024年七月28日 08:08 UTC](https://meta.discourse.org/t/national-flags/55969/121 "2024-07-28T08:08:48Z")

</div>

我不记得原始来源了，但该集旨在符合 ISO 3166。

不过我注意到这里有一个包含科索沃的公共领域来源。

也许可以用它：

> **[About us](https://flagpedia.net/about)**
>
> Flagpedia.net is an actively maintained and updated website with a goal to provide the best overview and source of flags of the world.

我可以帮助审查任何 PR。

---

<div class="post-metadata">

### Author: ![anon48433008](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anon48433008](https://meta.discourse.org/u/anon48433008)
#### Post date: [2024年七月28日 11:38 UTC](https://meta.discourse.org/t/national-flags/55969/122 "2024-07-28T11:38:09Z")

</div>

> [@merefield](#):
>
> 我可以通过审查任何PR来提供帮助

我不知道PR和forks，但这里的询问不也表明了改进的兴趣吗？

美国各州实际上是独立的国家，我明白普遍的看法将它们排除在外，但我希望这个插件能对不常见的想法更具包容性 🙂

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2024年七月28日 11:39 UTC](https://meta.discourse.org/t/national-flags/55969/123 "2024-07-28T11:39:57Z")

</div>

#Marketplace 是你的朋友。

---

<div class="post-metadata">

### Author: ![anon48433008](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anon48433008](https://meta.discourse.org/u/anon48433008)
#### Post date: [2024年七月28日 11:44 UTC](https://meta.discourse.org/t/national-flags/55969/124 "2024-07-28T11:44:21Z")

</div>

啊啊，原谅我，我没看到我可以像提供付钱给我一样提供帮助，我将成为你的朋友。

我的错。

[上一頁](https://meta.discourse.org/t/national-flags/55969.md?page=5)

[下一頁](https://meta.discourse.org/t/national-flags/55969.md?page=7)
