diff --git a/apps/emqx_dashboard/src/emqx_dashboard_desc_cache.erl b/apps/emqx_dashboard/src/emqx_dashboard_desc_cache.erl index 9d8d1905d..b503fed88 100644 --- a/apps/emqx_dashboard/src/emqx_dashboard_desc_cache.erl +++ b/apps/emqx_dashboard/src/emqx_dashboard_desc_cache.erl @@ -36,7 +36,7 @@ init() -> OtherLangDesc0 = filelib:wildcard("desc.*.hocon", WwwStaticDir), OtherLangDesc = lists:map(fun(F) -> filename:join([WwwStaticDir, F]) end, OtherLangDesc0), Files = [EngDesc | OtherLangDesc], - ?MODULE = ets:new(?MODULE, [named_table, public, set, {read_concurrency, true}]), + ok = emqx_utils_ets:new(?MODULE, [public, ordered_set, {read_concurrency, true}]), ok = lists:foreach(fun(F) -> load_desc(?MODULE, F) end, Files). %% @doc Load the description of the configuration items from the file. diff --git a/scripts/merge-config.escript b/scripts/merge-config.escript index b3c214dd7..14ec979f2 100755 --- a/scripts/merge-config.escript +++ b/scripts/merge-config.escript @@ -110,14 +110,14 @@ merge_desc_files_per_lang(Lang) -> BaseConf = <<"">>, Cfgs0 = get_all_desc_files(Lang), Conf = do_merge_desc_files_per_lang(BaseConf, Cfgs0), - OutputFile = case Lang of + OutputFile = case Lang of "en" -> %% en desc will always be in the priv dir of emqx_dashboard "apps/emqx_dashboard/priv/desc.en.hocon"; "zh" -> %% so far we inject zh desc as if it's extracted from dashboard package %% TODO: remove this when we have zh translation moved to dashboard package - "apps/emqx_dashboard/priv/www/static/desc.zh.hocon" + "apps/emqx_dashboard/priv/www/static/desc.zh.hocon" end, ok = filelib:ensure_dir(OutputFile), ok = file:write_file(OutputFile, Conf).