diff options
author | stuconnolly <stuart02@gmail.com> | 2010-10-19 15:34:42 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-10-19 15:34:42 +0000 |
commit | 54a82bd39cb5a4e9368700030fcd71ab5e724362 (patch) | |
tree | 39d2f47b6b6edeba2d0f4e14903fca06b83d7aa2 | |
parent | 07c60cd26a34d2aac9d31eac3dae390647ab9fd1 (diff) | |
download | sequelpro-54a82bd39cb5a4e9368700030fcd71ab5e724362.tar.gz sequelpro-54a82bd39cb5a4e9368700030fcd71ab5e724362.tar.bz2 sequelpro-54a82bd39cb5a4e9368700030fcd71ab5e724362.zip |
Localize the header included in SQL and XML exports.
-rw-r--r-- | Resources/English.lproj/Localizable.strings | bin | 182704 -> 182972 bytes | |||
-rw-r--r-- | Source/SPExportFileUtilities.m | 14 | ||||
-rw-r--r-- | Source/SPSQLExporter.m | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/Resources/English.lproj/Localizable.strings b/Resources/English.lproj/Localizable.strings Binary files differindex 159ca149..7cb2e5ab 100644 --- a/Resources/English.lproj/Localizable.strings +++ b/Resources/English.lproj/Localizable.strings diff --git a/Source/SPExportFileUtilities.m b/Source/SPExportFileUtilities.m index e256b1be..2688b369 100644 --- a/Source/SPExportFileUtilities.m +++ b/Source/SPExportFileUtilities.m @@ -54,11 +54,11 @@ // Write the file header and the first table name [file writeData:[[NSMutableString stringWithFormat:@"%@: %@ %@: %@ %@: %@%@%@%@ %@%@%@", - NSLocalizedString(@"Host", @"csv export host heading"), + NSLocalizedString(@"Host", @"export header host label"), [tableDocumentInstance host], - NSLocalizedString(@"Database", @"csv export database heading"), + NSLocalizedString(@"Database", @"export header database label"), [tableDocumentInstance database], - NSLocalizedString(@"Generation Time", @"csv export generation time heading"), + NSLocalizedString(@"Generation Time", @"export header generation time label"), [NSDate date], lineEnding, lineEnding, @@ -80,11 +80,11 @@ [header setString:@"<?xml version=\"1.0\"?>\n\n"]; [header appendString:@"<!--\n-\n"]; [header appendString:@"- Sequel Pro XML dump\n"]; - [header appendFormat:@"- Version %@\n-\n", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]; + [header appendFormat:@"- %@ %@\n-\n", NSLocalizedString(@"Version", @"export header version label"), [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]; [header appendFormat:@"- %@\n- %@\n-\n", SPLOCALIZEDURL_HOMEPAGE, SPDevURL]; - [header appendFormat:@"- Host: %@ (MySQL %@)\n", [tableDocumentInstance host], [tableDocumentInstance mySQLVersion]]; - [header appendFormat:@"- Database: %@\n", [tableDocumentInstance database]]; - [header appendFormat:@"- Generation Time: %@\n", [NSDate date]]; + [header appendFormat:@"- %@: %@ (MySQL %@)\n", NSLocalizedString(@"Host", @"export header host label"), [tableDocumentInstance host], [tableDocumentInstance mySQLVersion]]; + [header appendFormat:@"- %@: %@\n", NSLocalizedString(@"Database", @"export header database label"), [tableDocumentInstance database]]; + [header appendFormat:@"- %@ Time: %@\n", NSLocalizedString(@"Generation Time", @"export header generation time label"), [NSDate date]]; [header appendString:@"-\n-->\n\n"]; if (exportSource == SPTableExport) { diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m index 64251456..993b2753 100644 --- a/Source/SPSQLExporter.m +++ b/Source/SPSQLExporter.m @@ -175,11 +175,11 @@ // Add the dump header to the dump file [metaString appendString:@"# Sequel Pro SQL dump\n"]; - [metaString appendFormat:@"# Version %@\n#\n", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]; + [metaString appendFormat:@"# %@ %@\n#\n", NSLocalizedString(@"Version", @"export header version label"), [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]; [metaString appendFormat:@"# %@\n# %@\n#\n", SPLOCALIZEDURL_HOMEPAGE, SPDevURL]; - [metaString appendFormat:@"# Host: %@ (MySQL %@)\n", [self sqlDatabaseHost], [self sqlDatabaseVersion]]; - [metaString appendFormat:@"# Database: %@\n", [self sqlDatabaseName]]; - [metaString appendFormat:@"# Generation Time: %@\n", [NSDate date]]; + [metaString appendFormat:@"# %@: %@ (MySQL %@)\n", NSLocalizedString(@"Host", @"export header host label"), [self sqlDatabaseHost], [self sqlDatabaseVersion]]; + [metaString appendFormat:@"# %@: %@\n", NSLocalizedString(@"Database", @"export header database label"), [self sqlDatabaseName]]; + [metaString appendFormat:@"# %@: %@\n", NSLocalizedString(@"Generation Time", @"export header generation time label"), [NSDate date]]; [metaString appendString:@"# ************************************************************\n\n\n"]; // Add commands to store the client encodings used when importing and set to UTF8 to preserve data @@ -221,7 +221,7 @@ lastProgressValue = 0; // Add the name of table - [[self exportOutputFile] writeData:[[NSString stringWithFormat:@"# Dump of table %@\n# ------------------------------------------------------------\n\n", tableName] dataUsingEncoding:[self exportOutputEncoding]]]; + [[self exportOutputFile] writeData:[[NSString stringWithFormat:@"# %@ %@\n# ------------------------------------------------------------\n\n", NSLocalizedString(@"Dump of table", @"sql export dump of table label"), tableName] dataUsingEncoding:[self exportOutputEncoding]]]; // Determine whether this table is a table or a view via the CREATE TABLE command, and keep the create table syntax queryResult = [connection queryString:[NSString stringWithFormat:@"SHOW CREATE TABLE %@", [tableName backtickQuotedString]]]; |