<commit_before>/*

https://stackoverflow.com/questions/9083464/i18n-localization-plugin-for-jquery-mobile

TO use it, just "mark" an html element

<h1 uilang="unknown_user"></h1>
or call

Lang.get('unknown_user')
to get the localized string

To initialize, call the "constructor"

new Lang("ITA", true);
To use it specifyng a language,

<script type="text/javascript" src="js/Lang.js?language=ita"></script>
 */

// AutoStar!
// Grab the parameters from my url, and initialize myself! FUGOOOOO
(function __lang_init_wrapper()
{
  var scriptSrc = $('script[src*=langprovider]').attr('src');
  var lang      = gup('language',scriptSrc);

  new Lang(lang, false);

})();

/**
* Thanks to: http://wowmotty.blogspot.com/2010/04/get-parameters-from-your-script-tag.html
* @param n
* @param s
*/
function gup(n,s){
n = n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");
var p = (new RegExp("[\\?&]"+n+"=([^&#]*)")).exec(s);
return (p===null) ? "" : p[1];
}

/**
*
* @param language The language to use
* @param replaceText If true, replace all the occurency marked with placemark {lang=<key>}
*/
function Lang(language, replaceText)
{

  var Languages =
  {
    enUS:
    {
      ok: 'Ok',
      name: 'Name',
      yes: 'Yes',
      no: 'No',
      edit: 'Edit',
      copy: 'Copy',
      move: 'Move',
      delete: 'Delete',
      compress: 'Compress',
      expand: 'Expand',
      cancel: 'Cancel',
      abort: 'Abort',
      none: 'None',
      tools: 'Tools',
      description: 'Description',
      suppliers: 'Suppliers',
      footprint: 'Footprint',
      footprints: 'Footprints',
      categories: 'Categories',
      partTitle: 'Part details',
      moreInfo: 'Learn more',
      enterName: 'Enter name',
      storageLocation: 'Storage location',
      storageLocations: 'Storage locations',
      editCategories: 'Edit categories',
      componentDatabase: 'Component database',
      mainTitle: 'SHELF-DB Component Database',
      areYouSureQuestion: 'Are you sure?',
      editCategoryMove: 'Kategorie verschieben',
      editCategoryMoveConfirmTest: function(nodeName, targetNodeName) {
        return 'Move category "'+nodeName+'" as well as all its sub groups to "'+ (targetNodeName || 'root level') +'?';
      },
      editCategoryRemoveLeafHint: function(parentNodeName) {
        return 'Contained parts will be moved to the parent category "' + parentNodeName + '".';
      },
      editCategoryRemoveLeafQuestion: function( categoryName, subLeavesNamesHint, subLeavesMoveHint ) {
        return 'Do you really want to delete the category "'+categoryName+'"' + subLeavesNamesHint + '?'
          + ' ' + subLeavesMoveHint + ' This action cannot be reverted.';
      },
      editCategoryRemoveSubLeavesHint: function(subLeavesString) {
        return ' as well as the sub categories ' + subLeavesString;
      },
    },

    deDE:
    {
      yes: 'Ja',
      no: 'Nein',
      add: 'Anlegen',
      edit: 'Bearbeiten',
      copy: 'Kopieren',
      change: 'Ändern',
      move: 'Verschieben',
      delete: 'Löschen',
      reset: 'Zurücksetzen',
      compress: 'Zuklappen',
      expand: 'Aufklappen',
      searchPlaceholder: 'Suche...',
      cancel: 'Abbrechen',
      abort: 'Abbrechen',
      none: 'Keine',
      tools: 'Werkzeuge',
      image: 'Bild',
      images: 'Bilder',
      input: 'Eingabe',
      copyOf: function(name) {
        return 'Kopie von '+name;
      },
      uploadImageLabel: 'Bild hochladen',
      description: 'Beschreibung',
      datasheets: 'Datenblätter',
      supplier: 'Lieferant',
      suppliers: 'Lieferanten',
      footprints: 'Bauformen',
      footprint: 'Bauform',
      categories: 'Kategorien',
      partTitle: 'Bauteilansicht',
      partNumber: 'Artikelnummer',
      amountStored: 'Menge eingelagert',
      amountAvailable: 'Menge vorhanden',
      moreInfo: 'Mehr informationen',
      noUndoHint: 'Diese Aktion kann nicht rückgängig gemacht werden.',
      searchResults: 'Suchergebnisse',
      searchResultsFor: function(str) {
        return 'Suchergebnisse für "'+str+'"';
      },
      enterName: 'Namen eingeben',
      enterUrl: 'Geben Sie eine Adresse an',
      enterDescription: 'Beschreibung eingeben',
      enterPartNumber: 'Artikelnummer eingeben',
      resetImage: 'Bild wiederherstellen',
      defaultImage: 'Standardbild',
      storageLocation: 'Lagerort',
      storageLocations: 'Lagerorte',
      storageLocationShowNonEmpty: 'Belegte Fächer',
      storageLocationShowEmpty: 'Leerfächer',
      noFootprintShow: 'Teile ohne Bauform',
      icLogosShow: 'IC Hersteller',
      orderItemsShow: 'Zu bestellende Teile',<commit_msg>- Updated language provider with login strings<commit_after>/*

https://stackoverflow.com/questions/9083464/i18n-localization-plugin-for-jquery-mobile

TO use it, just "mark" an html element

<h1 uilang="unknown_user"></h1>
or call

Lang.get('unknown_user')
to get the localized string

To initialize, call the "constructor"

new Lang("ITA", true);
To use it specifyng a language,

<script type="text/javascript" src="js/Lang.js?language=ita"></script>
 */

// AutoStar!
// Grab the parameters from my url, and initialize myself! FUGOOOOO
(function __lang_init_wrapper()
{
  var scriptSrc = $('script[src*=langprovider]').attr('src');
  var lang      = gup('language',scriptSrc);

  new Lang(lang, false);

})();

/**
* Thanks to: http://wowmotty.blogspot.com/2010/04/get-parameters-from-your-script-tag.html
* @param n
* @param s
*/
function gup(n,s){
n = n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");
var p = (new RegExp("[\\?&]"+n+"=([^&#]*)")).exec(s);
return (p===null) ? "" : p[1];
}

/**
*
* @param language The language to use
* @param replaceText If true, replace all the occurency marked with placemark {lang=<key>}
*/
function Lang(language, replaceText)
{

  var Languages =
  {
    enUS:
    {
      ok: 'Ok',
      name: 'Name',
      yes: 'Yes',
      no: 'No',
      edit: 'Edit',
      copy: 'Copy',
      move: 'Move',
      delete: 'Delete',
      compress: 'Compress',
      expand: 'Expand',
      cancel: 'Cancel',
      abort: 'Abort',
      none: 'None',
      tools: 'Tools',
      description: 'Description',
      suppliers: 'Suppliers',
      footprint: 'Footprint',
      footprints: 'Footprints',
      categories: 'Categories',
      partTitle: 'Part details',
      moreInfo: 'Learn more',
      enterName: 'Enter name',
      storageLocation: 'Storage location',
      storageLocations: 'Storage locations',
      editCategories: 'Edit categories',
      componentDatabase: 'Component database',
      mainTitle: 'SHELF-DB Component Database',
      areYouSureQuestion: 'Are you sure?',
      editCategoryMove: 'Kategorie verschieben',
      editCategoryMoveConfirmTest: function(nodeName, targetNodeName) {
        return 'Move category "'+nodeName+'" as well as all its sub groups to "'+ (targetNodeName || 'root level') +'?';
      },
      editCategoryRemoveLeafHint: function(parentNodeName) {
        return 'Contained parts will be moved to the parent category "' + parentNodeName + '".';
      },
      editCategoryRemoveLeafQuestion: function( categoryName, subLeavesNamesHint, subLeavesMoveHint ) {
        return 'Do you really want to delete the category "'+categoryName+'"' + subLeavesNamesHint + '?'
          + ' ' + subLeavesMoveHint + ' This action cannot be reverted.';
      },
      editCategoryRemoveSubLeavesHint: function(subLeavesString) {
        return ' as well as the sub categories ' + subLeavesString;
      },
    },

    deDE:
    {
      yes: 'Ja',
      no: 'Nein',
      add: 'Anlegen',
      edit: 'Bearbeiten',
      copy: 'Kopieren',
      change: 'Ändern',
      move: 'Verschieben',
      delete: 'Löschen',
      reset: 'Zurücksetzen',
      compress: 'Zuklappen',
      expand: 'Aufklappen',
      searchPlaceholder: 'Suche...',
      cancel: 'Abbrechen',
      abort: 'Abbrechen',
      none: 'Keine',
      tools: 'Werkzeuge',
      image: 'Bild',
      images: 'Bilder',
      input: 'Eingabe',
      copyOf: function(name) {
        return 'Kopie von '+name;
      },
      account: 'Benutzerkonto',
      login: 'Einloggen',
      logout: 'Ausloggen',
      logoutUser: function(username) {
        return username + " ausloggen";
      },
      username: 'Benutzername',
      password: '<PASSWORD>',
      register: 'Registrieren',
      uploadImageLabel: 'Bild hochladen',
      description: 'Beschreibung',
      datasheets: 'Datenblätter',
      supplier: 'Lieferant',
      suppliers: 'Lieferanten',
      footprints: 'Bauformen',
      footprint: 'Bauform',
      categories: 'Kategorien',
      partTitle: 'Bauteilansicht',
      partNumber: 'Artikelnummer',
      amountStored: 'Menge eingelagert',
      amountAvailable: 'Menge vorhanden',
      moreInfo: 'Mehr informationen',
      noUndoHint: 'Diese Aktion kann nicht rückgängig gemacht werden.',
      loginHint: 'Geben Sie Benutzername und Passwort ein, um sich einzuloggen.',
      searchResults: 'Suchergebnisse',
      searchResultsFor: function(str) {
        return 'Suchergebnisse für "'+str+'"';
      },
      enterName: 'Namen eingeben',
      enterUsername: 'Benutzername eingeben',
      enterPassword: '<PASSWORD>',
      enterUrl: 'Geben Sie eine Adresse an',
      enterDescription: 'Beschreibung eingeben',
      enterPartNumber: 'Artikelnummer eingeben',
      resetImage: 'Bild wiederherstellen',
      defaultImage: 'Standardbild',
      storageLocation: 'Lagerort',
      storageLocations: 'Lagerorte',
      storageLocationShowNonEmpty: 'Belegte Fächer',
      storageLocationShowEmpty: 'Leerfächer',
      noFootprintShow: 'Teile ohne Bauform',
      icLogosShow: 'IC Hersteller',
      orderItemsShow: 'Zu bestellende Teile',
{'fraction_non_alphanumeric': 0.14018307106860023, 'fraction_numerical': 0.0037025609379821045, 'mean_word_length': 3.1081537811575832, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '6779536', 'n_tokens_mistral': 3125, 'n_tokens_neox': 3122, 'n_words': 769}