Skip to content

Commit

Permalink
Add missed en_US.csv.
Browse files Browse the repository at this point in the history
  • Loading branch information
guoguolong committed Nov 10, 2013
1 parent 9096b62 commit 01567a3
Show file tree
Hide file tree
Showing 6 changed files with 333 additions and 0 deletions.
35 changes: 35 additions & 0 deletions app/code/Magento/Backend/i18n/en_US.csv
@@ -0,0 +1,35 @@
"-- No Theme --","-- No Theme --"
2YTD,2YTD
"Additional Settings","Additional Settings"
"An error occurred while disabling cache.","An error occurred while disabling cache."
"An error occurred while enabling cache.","An error occurred while enabling cache."
"An error occurred while refreshing cache.","An error occurred while refreshing cache."
"Authentication error occurred.","Authentication error occurred."
Bcc,Bcc
"Design Theme","Design Theme"
ImageMagick,ImageMagick
"Log in","Log in"
"Magento Admin Panel","Magento Admin Panel"
"Magento is an eBay Inc. company. Copyright© %1 Magento, Inc. All rights reserved.', date('Y","Magento is an eBay Inc. company. Copyright© %1 Magento, Inc. All rights reserved.', date('Y"
"Maximum sender name length is 255. Please correct your settings.","Maximum sender name length is 255. Please correct your settings."
"PHP GD2","PHP GD2"
"Please confirm site switching. All data that hasn't been saved will be lost.","Please confirm site switching. All data that hasn't been saved will be lost."
"Please correct the column format and try again.","Please correct the column format and try again."
"Please correct the tab configuration and try again.","Please correct the tab configuration and try again."
"Please correct the timezone.","Please correct the timezone."
"Please correct the user name or password.","Please correct the user name or password."
"Search String","Search String"
"Sorry, the default display currency you selected in not available in allowed currencies.","Sorry, the default display currency you selected in not available in allowed currencies."
"Sorry, we haven't installed the base currency you selected.","Sorry, we haven't installed the base currency you selected."
"Sorry, we haven't installed the default display currency you selected.","Sorry, we haven't installed the default display currency you selected."
"Specify a fully qualified URL.","Specify a fully qualified URL."
"There are no search keywords.","There are no search keywords."
"This attribute shares the same value in all stores.","This attribute shares the same value in all stores."
"We can't save the Cron expression.","We can't save the Cron expression."
"We couldn't find any records.","We couldn't find any records."
YTD,YTD
"You entered an invalid Secret Key. Please refresh the page.","You entered an invalid Secret Key. Please refresh the page."
"You need more permissions to do this.","You need more permissions to do this."
"You saved the configuration.","You saved the configuration."
"invalid request","invalid request"
"see error log for details","see error log for details"
92 changes: 92 additions & 0 deletions app/code/Magento/DesignEditor/i18n/en_US.csv
@@ -0,0 +1,92 @@
"(Hold down button for options)","(Hold down button for options)"
"Add Custom","Add Custom"
"Add Files","Add Files"
"Add white borders to images that are smaller than the container.","Add white borders to images that are smaller than the container."
"Alternative Text","Alternative Text"
"Are you sure you want to delete this file?","Are you sure you want to delete this file?"
"Are you sure you want to delete this folder?","Are you sure you want to delete this folder?"
"Are you sure you want to delete this theme?","Are you sure you want to delete this theme?"
"Assign New Theme","Assign New Theme"
"Assign to a Store View","Assign to a Store View"
"Assigned to: ","Assigned to: "
"Available Themes","Available Themes"
Backgrounds,Backgrounds
"Browse Files","Browse Files"
"Buttons & Icons","Buttons & Icons"
CSS,CSS
"CSS Editor ","CSS Editor "
"Choose the store views you want to update.","Choose the store views you want to update."
"Close Message","Close Message"
"Close Panel","Close Panel"
"Create Folder","Create Folder"
"Custom CSS","Custom CSS"
"Custom javascript files","Custom javascript files"
"Delete file","Delete file"
"Do you want to restore the theme defaults?","Do you want to restore the theme defaults?"
"Download File","Download File"
"Download file","Download file"
"Drag and drop files to reorder them.","Drag and drop files to reorder them."
"Edit Custom CSS","Edit Custom CSS"
"Edit Text","Edit Text"
"Edit Theme","Edit Theme"
"Edit Theme Name","Edit Theme Name"
"Element ""%1"" is not found in ""%2""."
"Files Uploaded","Files Uploaded"
"Font Assets","Font Assets"
Fonts,Fonts
"Image Assets","Image Assets"
"Image Sizing","Image Sizing"
"Insert file","Insert file"
JS,JS
"Magento Admin Panel","Magento Admin Panel"
"My Customizations","My Customizations"
"Page Text","Page Text"
"Please assign this theme to a store view and upload your store logo.","Please assign this theme to a store view and upload your store logo."
"Quick Styles","Quick Styles"
"Reset to Original","Reset to Original"
"Restore Theme Defaults","Restore Theme Defaults"
"Restore Theme Version","Restore Theme Version"
"Restore last saved version of theme","Restore last saved version of theme"
"Restore theme defaults","Restore theme defaults"
"Save & Assign","Save & Assign"
"Select JS Files to Upload","Select JS Files to Upload"
"Sorry, but we can't load the theme list.","Sorry, but we can't load the theme list."
"Sorry, but you cannot edit these theme styles.","Sorry, but you cannot edit these theme styles."
"Sorry, but you cannot resize images for this theme.","Sorry, but you cannot resize images for this theme."
"Sorry, there was an unknown error.","Sorry, there was an unknown error."
"Store Designer","Store Designer"
"The file can't be found or edited.","The file can't be found or edited."
"Theme has not been set","Theme has not been set"
"Themes Assigned to Store Views","Themes Assigned to Store Views"
"Themes Not Assigned to Store Views","Themes Not Assigned to Store Views"
"There are no customized themes.","There are no customized themes."
"This theme is not assigned.","This theme is not assigned."
"This theme is not saved.","This theme is not saved."
"Tips & Messages","Tips & Messages"
"Toggle Page Text","Toggle Page Text"
"Update the CSS code to overwrite the default styles or upload your own CSS file.","Update the CSS code to overwrite the default styles or upload your own CSS file."
"Upload Custom CSS","Upload Custom CSS"
"Upload a Logo","Upload a Logo"
"Upload an Image","Upload an Image"
"Variable Text","Variable Text"
"We can't find this theme.","We can't find this theme."
"We can't load the list of themes.","We can't load the list of themes."
"We can't save image sizes.","We can't save image sizes."
"We can't save the custom css file.","We can't save the custom css file."
"We cannot upload the CSS file.","We cannot upload the CSS file."
"We cannot upload the JS file.","We cannot upload the JS file."
"We could not detect a size.","We could not detect a size."
"We don't recognize or support this file extension type.","We don't recognize or support this file extension type."
"We found no javascript files.","We found no javascript files."
"We saved the image sizes.","We saved the image sizes."
"When you edit a theme, we save it as a unique version in ""My Customizations.""","When you edit a theme, we save it as a unique version in ""My Customizations."""
"Wrong theme type set as editable","Wrong theme type set as editable"
"You assigned a new theme to your store view.","You assigned a new theme to your store view."
"You assigned a theme to your live store.","You assigned a theme to your live store."
"You cannot duplicate this theme.","You cannot duplicate this theme."
"You chose a new theme for your live store. Click ""OK"" to replace your current theme.","You chose a new theme for your live store. Click ""OK"" to replace your current theme."
"You chose a theme for your new store. Click ""OK"" to go live. You can always modify or switch themes in ""My Customizations"" and ""Available Themes.""","You chose a theme for your new store. Click ""OK"" to go live. You can always modify or switch themes in ""My Customizations"" and ""Available Themes."""
"You saved a duplicate copy of this theme in ""My Customizations.""","You saved a duplicate copy of this theme in ""My Customizations."""
"You saved updates to this theme.","You saved updates to this theme."
"You updated the custom.css file.","You updated the custom.css file."
"You updated your live store.","You updated your live store."
100 changes: 100 additions & 0 deletions app/code/Magento/DuplicatedLocaleChecker.php
@@ -0,0 +1,100 @@
<?php
class DuplicatedLocaleChecker {
protected $rows = array();

public function getAppCodeDir() {
return __DIR__ . '/..';
}

public function getTargetDir() {
return __DIR__ ;
}

public function saveCSV($namespace , $lang_code = 'en_US') {
if(!$this->matches) return false;
$rows = array();
foreach($this->matches AS $key=>$value){
$key = str_replace('\\' , '' , $key);
$value = __($key);
if($key == $value) $rows[] = array($key , $value);
}
$fp = fopen($this->getTargetDir() . '/' . $namespace . '/' . $lang_code . '.csv', 'w');
foreach ($rows as $fields) {
fputcsv($fp, $fields);
}

fclose($fp);
return true;
}

public function getCSV($file) {
$rows = array();
if (($handle = fopen($file, "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$row = array();
$num = count($data);
if($num>=1) {
$rows[$data[0]] = $data[1];
}
}
fclose($handle);
}
return $rows;
}

public function collect() {
$code_dir = $this->getAppCodeDir();
$namespaces = array();
$module_base_dirs = glob($code_dir.'/*');
foreach($module_base_dirs AS $module_base_dir) {
$namespace_prefix = array_pop(explode('/' , $module_base_dir));
if($namespace_prefix <> 'Magento' ) continue;
$module_dirs = glob($module_base_dir.'/*');
foreach($module_dirs AS $module_dir) {
$namespace = $namespace_prefix . '_' . array_pop(explode('/' , $module_dir));
$this->iterate($module_dir , $namespace);
// $this->saveCSV($namespace , 'en_US');
}
$dup_rows = array();
foreach ($this->rows as $key => $row ){
if($row['count']>2) {
$dup_rows[$key] = $row;
}
}
error_log(print_r($dup_rows,true));
error_log(count($dup_rows));
}
}

public function process($file , $namespace , $level) {
$rows = $this->getCSV($file);
foreach ($rows as $key => $value) {
$values = array();
$count = 1;
if(isset($this->rows[$key])) {
$count = $this->rows[$key]['count']+1;
$values = $this->rows[$key]['values'];
}
$values[$namespace] = $value;
$this->rows[$key] = array(
'values' => $values,
'count' => $count,
);
}
}

public function iterate($path , $namespace , $level = 0) {
if(is_file($path) && preg_match('/en_US\.csv/' , $path)) {
$this->process($path , $namespace , $level);
} else {
$sub_dirs = glob($path.'/*');
$level++;
foreach ($sub_dirs as $sub_dir) {
$this->iterate($sub_dir , $namespace , $level);
}
}
}
}

$checker = new DuplicatedLocaleChecker();
$checker->collect();
47 changes: 47 additions & 0 deletions app/code/Magento/Theme/i18n/en_US.csv
@@ -0,0 +1,47 @@
"Add New Theme","Add New Theme"
"Allowed file types *.css.","Allowed file types *.css."
"Allowed file types *.js.","Allowed file types *.js."
"Are you sure you want to delete this file?","Are you sure you want to delete this file?"
"Are you sure you want to delete this folder?","Are you sure you want to delete this folder?"
"Are you sure you want to delete this theme?","Are you sure you want to delete this theme?"
"Browse Files","Browse Files"
"CSS Editor","CSS Editor"
"Create Folder","Create Folder"
"Custom CSS","Custom CSS"
"Download CSS File","Download CSS File"
"Edit custom.css","Edit custom.css"
"Example: 0.0.0.1 or 123.1.0.25-alpha1","Example: 0.0.0.1 or 123.1.0.25-alpha1"
"JS Editor","JS Editor"
"New Theme","New Theme"
"Parent Theme","Parent Theme"
"Select CSS File to Upload","Select CSS File to Upload"
"Select JS Files to Upload","Select JS Files to Upload"
"Something is wrong with the file upload settings.","Something is wrong with the file upload settings."
"Sorry, there was an unknown error.","Sorry, there was an unknown error."
Theme,Theme
"Theme CSS","Theme CSS"
"Theme Java Script","Theme Java Script"
"Theme Path","Theme Path"
"Theme Preview Image","Theme Preview Image"
"Theme Settings","Theme Settings"
"Theme Title","Theme Title"
"Theme Version","Theme Version"
"Theme isn't editable.","Theme isn't editable."
"This file will replace the current custom.css file and can't be more than 2 MB.","This file will replace the current custom.css file and can't be more than 2 MB."
"Upload CSS File","Upload CSS File"
"Upload Fonts","Upload Fonts"
"Upload Images","Upload Images"
"Upload JS Files","Upload JS Files"
"Use only standard alphanumeric, dashes and underscores.","Use only standard alphanumeric, dashes and underscores."
"We cannot delete the theme.","We cannot delete the theme."
"We cannot detect a size.","We cannot detect a size."
"We cannot find a directory with this name.","We cannot find a directory with this name."
"We cannot find file","We cannot find file"
"We cannot find the theme.","We cannot find the theme."
"We cannot upload the CSS file.","We cannot upload the CSS file."
"We cannot upload the JS file.","We cannot upload the JS file."
"We cannot upload the file.","We cannot upload the file."
"We found a directory with the same name.","We found a directory with the same name."
"We found no files.","We found no files."
"You deleted the theme.","You deleted the theme."
"You saved the theme.","You saved the theme."
23 changes: 23 additions & 0 deletions app/code/Magento/User/i18n/en_US.csv
@@ -0,0 +1,23 @@
"A user with the same user name or email already exists.","A user with the same user name or email already exists."
"First Name is a required field.","First Name is a required field."
"If there is an account associated with %1 you will receive an email with a link to reset your password.","If there is an account associated with %1 you will receive an email with a link to reset your password."
"Interface Locale","Interface Locale"
"Last Name is a required field.","Last Name is a required field."
"Magento Admin Panel","Magento Admin Panel"
"Password is required field.","Password is required field."
"Please correct the password reset token.","Please correct the password reset token."
"Please correct this email address:","Please correct this email address:"
"Please specify the correct account and try again.","Please specify the correct account and try again."
Role,Role
"This role no longer exists.","This role no longer exists."
"User Name is a required field.","User Name is a required field."
"Warning!\r\nThis action will remove this user from already assigned role\r\nAre you sure?","Warning!\r\nThis action will remove this user from already assigned role\r\nAre you sure?"
"Warning!\r\nThis action will remove those users from already assigned roles\r\nAre you sure?","Warning!\r\nThis action will remove those users from already assigned roles\r\nAre you sure?"
"We can't find a user to delete.","We can't find a user to delete."
"You cannot delete self-assigned roles.","You cannot delete self-assigned roles."
"You deleted the role.","You deleted the role."
"You deleted the user.","You deleted the user."
"You saved the role.","You saved the role."
"You saved the user.","You saved the user."
"Your password confirmation must match your password.","Your password confirmation must match your password."
"Your password must include both numeric and alphabetic characters.","Your password must include both numeric and alphabetic characters."
36 changes: 36 additions & 0 deletions app/code/Magento/Webapi/i18n/en_US.csv
@@ -0,0 +1,36 @@
"API Key","API Key"
"API Roles","API Roles"
"API Secret","API Secret"
"API Users","API Users"
"Add New API Role","Add New API Role"
"Add New API User","Add New API User"
"Company Name","Company Name"
"Contact Email","Contact Email"
"Content-Type header is empty.","Content-Type header is empty."
"Content-Type header is invalid.","Content-Type header is invalid."
"Decoding error.","Decoding error."
"Delete API Role","Delete API Role"
"Delete API User","Delete API User"
"Edit API Role","Edit API Role"
"Incorrect format of WSDL request URI or Requested services are missing.","Incorrect format of WSDL request URI or Requested services are missing."
"Invalid XML","Invalid XML"
"Invalid XML: Detected use of illegal DOCTYPE","Invalid XML: Detected use of illegal DOCTYPE"
"Magento is not yet installed","Magento is not yet installed"
"New API Role","New API Role"
"New API User","New API User"
"Operation allowed only in HTTPS","Operation allowed only in HTTPS"
"Request does not match any route.","Request does not match any route."
"Request method is invalid.","Request method is invalid."
"Save API Role","Save API Role"
"Save API User","Save API User"
"Server cannot understand Accept HTTP header media type.","Server cannot understand Accept HTTP header media type."
"The API role has been deleted.","The API role has been deleted."
"The API role has been saved.","The API role has been saved."
"The API user has been deleted.","The API user has been deleted."
"The API user has been saved.","The API user has been saved."
"This API role no longer exists.","This API role no longer exists."
"This role no longer exists.","This role no longer exists."
"UTF-8 is the only supported charset.","UTF-8 is the only supported charset."
"Unable to find a user to be deleted.","Unable to find a user to be deleted."
"Warning!\r\nThis action will remove those users from already assigned roles\r\nAre you sure?","Warning!\r\nThis action will remove those users from already assigned roles\r\nAre you sure?"
"Web Api","Web Api"

0 comments on commit 01567a3

Please sign in to comment.