Skip to content

Commit

Permalink
Allow customizing the separator used in .po file names.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Sep 30, 2024
1 parent 6401530 commit d17211f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/vibe/web/i18n.d
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ html
See_Also: `translationContext`
*/
mixin template translationModule(string FILENAME)
mixin template translationModule(string FILENAME, string language_separator = ".")
{
static import std.string;
enum NAME = std.string.tr(FILENAME, `/.\\-`, "____");
private static string file_mixins() {
string ret;
foreach (language; languages)
ret ~= "enum "~language~"_"~NAME~" = extractDeclStrings(import(`"~FILENAME~"."~language~".po`));\n";
ret ~= "enum "~language~"_"~NAME~" = extractDeclStrings(import(`"~FILENAME~language_separator~language~".po`));\n";
return ret;
}

Expand Down

0 comments on commit d17211f

Please sign in to comment.