original_string: private function generateSlugs($absoluteTranslationFileName)
      {
          $translations = I18nHelper::generateTranslationsFile($absoluteTranslationFileName);
          foreach ($this->routing as $key => &$info) {
              $keyParts = explode('#|#', $key);
              $keyParts = array_key_exists(1, $keyParts) ? $keyParts[1] : $keyParts[0];
              $slug = RouterHelper::slugify($keyParts);
              if (NULL !== $slug && !array_key_exists($slug, $translations)) {
                  $translations[$slug] = $info['label'];
                  file_put_contents($absoluteTranslationFileName, "\$translations[\"{$slug}\"] = t(\"{$info['label']}\");\n", FILE_APPEND);
              }
              $this->slugs[$slug] = $key;
              $info['slug'] = $slug;
          }
      }
code: private function generateSlugs($absoluteTranslationFileName)
      {
          $translations = I18nHelper::generateTranslationsFile($absoluteTranslationFileName);
          foreach ($this->routing as $key => &$info) {
              $keyParts = explode('#|#', $key);
              $keyParts = array_key_exists(1, $keyParts) ? $keyParts[1] : $keyParts[0];
              $slug = RouterHelper::slugify($keyParts);
              if (NULL !== $slug && !array_key_exists($slug, $translations)) {
                  $translations[$slug] = $info['label'];
                  file_put_contents($absoluteTranslationFileName, "\$translations[\"{$slug}\"] = t(\"{$info['label']}\");\n", FILE_APPEND);
              }
              $this->slugs[$slug] = $key;
              $info['slug'] = $slug;
          }
      }
code_tokens: private function generateSlugs ( $ absoluteTranslationFileName ) { $ translations = I18nHelper :: generateTranslationsFile ( $ absoluteTranslationFileName ) ; foreach ( $ this -> routing as $ key => & $ info ) { $ keyParts = explode ( '#|#' , $ key ) ; $ keyParts = array_key_exists ( 1 , $ keyParts ) ? $ keyParts [ 1 ] : $ keyParts [ 0 ] ; $ slug = RouterHelper :: slugify ( $ keyParts ) ; if ( NULL !== $ slug && ! array_key_exists ( $ slug , $ translations ) ) { $ translations [ $ slug ] = $ info [ 'label' ] ; file_put_contents ( $ absoluteTranslationFileName , "\$translations[\"{$slug}\"] = t(\"{$info['label']}\");\n" , FILE_APPEND ) ; } $ this -> slugs [ $ slug ] = $ key ; $ info [ 'slug' ] = $ slug ; } }
docstring: Parse slugs to create translations
  
  @param string $absoluteTranslationFileName
docstring_tokens: Parse slugs to create translations