<commit_before>`import Ember from 'ember'`
`import ENV from 'irene/config/environment';`
`import { translationMacro as t } from 'ember-i18n'`

NamespaceModalComponent = Ember.Component.extend

  i18n: Ember.inject.service()
  showNamespaceModal: false

  newNamespaceObserver: Ember.observer "realtime.namespace", ->
    @set "showNamespaceModal", true


  tRequestToAddNamespace: t("requestToAddNamespace")

  actions:
    addNamespace: ->
      tRequestToAddNamespace = @get "tRequestToAddNamespace"
      data =
        namespace: @get "realtime.namespace"
      that = @
      @get("ajax").post ENV.endpoints.namespaceAdd, data: data
      .then ->
        that.get("notify").success tRequestToAddNamespace
        that.set "showNamespaceModal", false
      .catch (error) ->
        that.get("notify").error error.payload.message
        for error in error.errors
          that.get("notify").error error.detail?.message

`export default NamespaceModalComponent`<commit_msg>fix: validate namespace from modal<commit_after>`import Ember from 'ember'`
`import ENV from 'irene/config/environment';`
`import { translationMacro as t } from 'ember-i18n'`

NamespaceModalComponent = Ember.Component.extend

  i18n: Ember.inject.service()
  showNamespaceModal: false

  newNamespaceObserver: Ember.observer "realtime.namespace", ->
    @set "showNamespaceModal", true


  tRequestToAddNamespace: t("requestToAddNamespace")
  tPleaseEnterAnyNamespace: t("pleaseEnterAnyNamespace")

  actions:
    addNamespace: ->
      tRequestToAddNamespace = @get "tRequestToAddNamespace"
      tPleaseEnterAnyNamespace = @get "tPleaseEnterAnyNamespace"
      namespace =  @get "realtime.namespace"
      if !namespace
        return @get("notify").error tPleaseEnterAnyNamespace, ENV.notifications
      data =
        namespace: namespace
      that = @
      @get("ajax").post ENV.endpoints.namespaceAdd, data: data
      .then ->
        that.get("notify").success tRequestToAddNamespace
        that.set "showNamespaceModal", false
      .catch (error) ->
        that.get("notify").error error.payload.message
        for error in error.errors
          that.get("notify").error error.detail?.message

`export default NamespaceModalComponent`
{'fraction_non_alphanumeric': 0.10852017937219731, 'fraction_numerical': 0.003587443946188341, 'mean_word_length': 3.6771488469601676, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5091747', 'n_tokens_mistral': 640, 'n_tokens_neox': 620, 'n_words': 138}