From c4d4fa93e2f0e498355a0fd08ab2dc3ff2051865 Mon Sep 17 00:00:00 2001 From: Francesco Frison Date: Fri, 28 Jun 2013 18:51:11 +0100 Subject: [PATCH] Update documentation --- Strings/ZFTranslationFile.m | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/Strings/ZFTranslationFile.m b/Strings/ZFTranslationFile.m index 0d0a01b..647ab57 100644 --- a/Strings/ZFTranslationFile.m +++ b/Strings/ZFTranslationFile.m @@ -211,6 +211,16 @@ - (NSArray *)allLanguages { #pragma mark - writing +/*! + @abstract + Generate the missing file URL extrapolated form the reference file + + @param langFile the receiving file to be chnaged + + @param referenceLangFile reference to generate the url + + */ + - (void)convertURLForLanguage:(ZFLangFile *)langFile fromLangFile:(ZFLangFile *)referenceLangFile { if (langFile.url) return; @@ -229,6 +239,16 @@ - (void)convertURLForLanguage:(ZFLangFile *)langFile fromLangFile:(ZFLangFile *) [[NSFileManager defaultManager] createDirectoryAtURL:[langFile.url URLByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:&error]; } +/*! + @abstract + Takes all the translations and write the files accordingly to the driven option + + @return BOOL if the process succeded or not + + @discussion At the moment the process is only generating the non-driven file. However this is wrong. Because the list of transaltion is merged between iOS and Android, and the driven file would not receive the new keys. + + */ + - (BOOL)writeAllTranslations { if (self.conversionDriver == ZFTranslationFileConversionDriverSkip) return NO; @@ -282,7 +302,19 @@ - (BOOL)writeAllTranslations { #pragma mark - sorting - +/*! + @abstract + sorted array of languages by type and language identifier + + @param type to be searched. Must not be ignored + + @param identifier to be searched. Can be nil + + @return NSArray of translations + + @discussion The tye argument is compulsory amd setting it to 0 will trigger iOS results. To be ammended in the future. + + */ - (NSArray *)translationsByType:(ZFLangType)type andLanguageIdentifier:(NSString *)identifier { NSPredicate *predicate = [NSPredicate predicateWithFormat:@"type = %d && language = %@", type, identifier];