translate = (locale, singular, plural, skipSyncToAllFiles) => {
    // add same key to all translations
    if (!skipSyncToAllFiles && syncFiles) {
      syncToAllFiles(singular, plural)
    }

    if (locale === undefined) {
      logWarn(
        'WARN: No locale found - check the context of the call to __(). Using ' +
          defaultLocale +
          ' as current locale'
      )
      locale = defaultLocale
    }

    // try to get a fallback
    if (!locales[locale]) {
      locale = getFallback(locale, fallbacks) || locale
    }

    // attempt to read when defined as valid locale
    if (!locales[locale]) {
      read(locale)
    }

    // fallback to default when missed
    if (!locales[locale]) {
      logWarn(
        'WARN: Locale ' +
          locale +
          " couldn't be read - check the context of the call to $__. Using " +
          defaultLocale +
          ' (default) as current locale'
      )

      locale = defaultLocale
      read(locale)
    }

    // dotnotaction add on, @todo: factor out
    let defaultSingular = singular
    let defaultPlural = plural
    if (objectNotation) {
      let indexOfColon = singular.indexOf(':')
      // We compare against 0 instead of -1 because
      // we don't really expect the string to start with ':'.
      if (indexOfColon > 0) {
        defaultSingular = singular.substring(indexOfColon + 1)
        singular = singular.substring(0, indexOfColon)
      }
      if (plural && typeof plural !== 'number') {
        indexOfColon = plural.indexOf(':')
        if (indexOfColon > 0) {
          defaultPlural = plural.substring(indexOfColon + 1)
          plural = plural.substring(0, indexOfColon)
        }
      }
    }

    const accessor = localeAccessor(locale, singular)
    const mutator = localeMutator(locale, singular)

    // if (plural) {
    //   if (accessor() == null) {
    //     mutator({
    //       'one': defaultSingular || singular,
    //       'other': defaultPlural || plural
    //     });
    //     write(locale);
    //   }
    // }
    // if (accessor() == null) {
    //   mutator(defaultSingular || singular);
    //   write(locale);
    // }
    if (plural) {
      if (accessor() == null) {
        // when retryInDefaultLocale is true - try to set default value from defaultLocale
        if (retryInDefaultLocale && locale !== defaultLocale) {
          logDebug(
            'Missing ' +
              singular +
              ' in ' +
              locale +
              ' retrying in ' +
              defaultLocale
          )
          mutator(translate(defaultLocale, singular, plural, true))
        } else {
          mutator({
            one: defaultSingular || singular,
            other: defaultPlural || plural
          })
        }
        write(locale)
      }
    }

    if (accessor() == null) {
      // when retryInDefaultLocale is true - try to set default value from defaultLocale
      if (retryInDefaultLocale && locale !== defaultLocale) {
        logDebug(
          'Missing ' +
            singular +
            ' in ' +
            locale +
            ' retrying in ' +
            defaultLocale
        )
        mutator(translate(defaultLocale, singular, plural, true))
      } else {
        mutator(defaultSingular || singular)
      }
      write(locale)
    }

    return accessor()
  }
read locale file, translate a msg and write to fs if new