        * @param {string} string                 String, which should be loaded
        * @return {string} Translated string into specified locale
       ###
-      env.addGlobal 'dpgettext', (domain = currentLocale, context, string) ->
-        domain = if domain.charAt(0) == ':' then currentLocale + domain else domain
-        gettext.dpgettext(domain, context, string)
+      env.addGlobal 'dpgettext', (domain, context, string) =>
+        @gettext.dpgettext(@resolveDomain(domain), context, string)
 
       ###*
       * Load plural string of specific context from current locale


          @gettext.addTextdomain(domain, messages)

    installNunjucksGlobals: (env, currentLocale) ->
      gettext = @gettext

      # --------------
      # i18n functions

      * @param {string} string          String, which should be loaded
      * @return {string} Translated string into current locale
      ###
      env.addGlobal 'pgettext', (context, string) =>
        @gettext.pgettext(context, string)

      ###*
       * Load string of specific context from specified domain
