Discussion
Loading...

Discussion

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Mayel
Mayel
@mayel  ·  activity timestamp 2 days ago

@mavnn@bonfire.mavnn.eu how did you try disabling locales?


  • Copy link
  • Flag this post
  • Block
Mayel
Mayel
@mayel replied  ·  activity timestamp 2 days ago

@mavnn@bonfire.mavnn.eu how did you try disabling locales?


  • Copy link
  • Flag this comment
  • Block
Bonfire
Bonfire
@Bonfire replied  ·  activity timestamp 7 hours ago

@mavnn@bonfire.mavnn.eu ​In version 1.0.2-alpha.6 you should be able to set COMPILE_ALL_LOCALES=no in env

  • Copy link
  • Flag this comment
  • Block
Michael Newton
Michael Newton
@mavnn@bonfire.mavnn.eu replied  ·  activity timestamp 7 hours ago

@Bonfire@bonfire.cafe @mayel@bonfire.cafe ​ah, good news. I've just deployed 1.0.1, where I tried setting the COMPILE_ALL_LOCALES but then spotted it was overridden by the :prod flag regardless. My last attempt was to directly edit config/bonfire_common.exs with static values:

--- a/config/bonfire_common.exs
+++ b/config/bonfire_common.exs
@@ -4,8 +4,8 @@ default_locale = "en"
## Localisation & internationalisation
# Only compile additional locales in prod or when explicitly requested
-compile_all_locales? =
- config_env() == :prod or System.get_env("COMPILE_ALL_LOCALES") in ["true", "1"]
+compile_all_locales? = false
+# config_env() == :prod or System.get_env("COMPILE_ALL_LOCALES") in ["true", "1"]
locales = if compile_all_locales?, do: [default_locale, "fr", "es", "it"], else: [default_locale]
@@ -18,7 +18,7 @@ config :bonfire_common,
config :bonfire_common, Bonfire.Common.Localise.Cldr,
default_locale: default_locale,
# locales that will be made available on top of those for which gettext localisation files are available
- locales: locales,
+ locales: [],
providers: [
Cldr.Language,
Cldr.DateTime,
@@ -33,10 +33,10 @@ config :bonfire_common, Bonfire.Common.Localise.Cldr,
gettext: Bonfire.Common.Localise.Gettext,
extra_gettext: [Timex.Gettext],
data_dir: "./priv/cldr",
- add_fallback_locales: compile_all_locales?,
+ add_fallback_locales: false,
# precompile_number_formats: ["¤¤#,##0.##"],
# precompile_transliterations: [{:latn, :arab}, {:thai, :latn}]
- force_locale_download: Mix.env() == :prod,
+ force_locale_download: false, # Mix.env() == :prod,
generate_docs: true
  • Copy link
  • Flag this comment
  • Block
Michael Newton
Michael Newton
@mavnn@bonfire.mavnn.eu replied  ·  activity timestamp 7 hours ago

@Bonfire@bonfire.cafe @mayel@bonfire.cafe ​I managed to get the compile to complete by shutting down everything else on the machine, and the compiled result only lists "en" as an available language, but it still seemed to want to generate 126 locales while building bonfire_common which was what made me think I was missing something.

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.5 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct