Changeset 5858


Ignore:
Timestamp:
04/05/14 05:17:21 (6 years ago)
Author:
avneesh-singh
Message:

improvements to lang pack update

Location:
trunk/Obi/Obi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Obi/Obi/ObiForm.cs

    r5857 r5858  
    49724972                    List<ZipStorer.ZipFileEntry> dir = zip.ReadCentralDir(); 
    49734973 
    4974                     bool flag = false; 
     4974                    bool isObiResourcesDll = false; 
    49754975 
    49764976                    foreach (ZipStorer.ZipFileEntry entry in dir) 
    49774977                    { 
     4978                         
    49784979                        if (Path.GetFileName(entry.FilenameInZip) == "Obi.resources.dll") 
    49794980                        { 
    4980                             string tempStr = dir[0].ToString().Replace("/", string.Empty); 
     4981                            string tempStr = Directory.GetParent(entry.ToString()).Name; 
     4982                            Console.WriteLine("zip entry : " + entry.ToString() + " : " + tempStr); 
     4983                             
    49814984                            zip.ExtractFile(entry, installationPath + @"\" + tempStr + @"\Obi.resources.dll"); 
    4982                             flag = true; 
     4985                            isObiResourcesDll = true; 
    49834986                        } 
    49844987                        else if (Path.GetFileName(entry.FilenameInZip) == "PipelineInterface.resources.dll") 
    49854988                        { 
    4986                             string tempStr = dir[0].ToString().Replace("/", string.Empty); 
     4989                            string tempStr = Directory.GetParent(entry.ToString()).Name; 
    49874990                            zip.ExtractFile(entry, installationPath + @"\" + tempStr + @"\PipelineInterface.resources.dll"); 
    49884991                        } 
    49894992 
    49904993                    } 
    4991                     if (!flag) 
    4992                     { 
    4993                         MessageBox.Show(Localizer.Message("Language_Pack"), Localizer.Message("Language_Pack_Caption")); 
     4994                    if (!isObiResourcesDll) 
     4995                    { 
     4996                        MessageBox.Show(Localizer.Message("Language_Pack_WrongFile"), Localizer.Message("Language_Pack_Caption")); 
    49944997                        m_FlagLangUpdate = true; 
    49954998                        m_ToolsLangPack_Click(sender, e); 
  • trunk/Obi/Obi/messages.Designer.cs

    r5848 r5858  
    30823082         
    30833083        /// <summary> 
     3084        ///   Looks up a localized string similar to Wrong File. 
     3085        /// </summary> 
     3086        internal static string Language_Pack_Caption { 
     3087            get { 
     3088                return ResourceManager.GetString("Language_Pack_Caption", resourceCulture); 
     3089            } 
     3090        } 
     3091         
     3092        /// <summary> 
     3093        ///   Looks up a localized string similar to Language Pack update is successfull. Please restart Obi for the changes to take effect. 
     3094        /// </summary> 
     3095        internal static string Language_Pack_Complete { 
     3096            get { 
     3097                return ResourceManager.GetString("Language_Pack_Complete", resourceCulture); 
     3098            } 
     3099        } 
     3100         
     3101        /// <summary> 
     3102        ///   Looks up a localized string similar to Update Successfull. 
     3103        /// </summary> 
     3104        internal static string Language_Pack_Complete_Caption { 
     3105            get { 
     3106                return ResourceManager.GetString("Language_Pack_Complete_Caption", resourceCulture); 
     3107            } 
     3108        } 
     3109         
     3110        /// <summary> 
     3111        ///   Looks up a localized string similar to Please select Language Pack zip file. 
     3112        /// </summary> 
     3113        internal static string Language_Pack_Select { 
     3114            get { 
     3115                return ResourceManager.GetString("Language_Pack_Select", resourceCulture); 
     3116            } 
     3117        } 
     3118         
     3119        /// <summary> 
     3120        ///   Looks up a localized string similar to Select Zip File. 
     3121        /// </summary> 
     3122        internal static string Language_Pack_Select_Caption { 
     3123            get { 
     3124                return ResourceManager.GetString("Language_Pack_Select_Caption", resourceCulture); 
     3125            } 
     3126        } 
     3127         
     3128        /// <summary> 
    30843129        ///   Looks up a localized string similar to You have selected the wrong file. 
    30853130        /// </summary> 
    3086         internal static string Language_Pack { 
    3087             get { 
    3088                 return ResourceManager.GetString("Language_Pack", resourceCulture); 
    3089             } 
    3090         } 
    3091          
    3092         /// <summary> 
    3093         ///   Looks up a localized string similar to Wrong File. 
    3094         /// </summary> 
    3095         internal static string Language_Pack_Caption { 
    3096             get { 
    3097                 return ResourceManager.GetString("Language_Pack_Caption", resourceCulture); 
    3098             } 
    3099         } 
    3100          
    3101         /// <summary> 
    3102         ///   Looks up a localized string similar to Language Pack update is successfull. Please restart Obi for the changes to take effect. 
    3103         /// </summary> 
    3104         internal static string Language_Pack_Complete { 
    3105             get { 
    3106                 return ResourceManager.GetString("Language_Pack_Complete", resourceCulture); 
    3107             } 
    3108         } 
    3109          
    3110         /// <summary> 
    3111         ///   Looks up a localized string similar to Update Successfull. 
    3112         /// </summary> 
    3113         internal static string Language_Pack_Complete_Caption { 
    3114             get { 
    3115                 return ResourceManager.GetString("Language_Pack_Complete_Caption", resourceCulture); 
    3116             } 
    3117         } 
    3118          
    3119         /// <summary> 
    3120         ///   Looks up a localized string similar to Please select Language Pack zip file. 
    3121         /// </summary> 
    3122         internal static string Language_Pack_Select { 
    3123             get { 
    3124                 return ResourceManager.GetString("Language_Pack_Select", resourceCulture); 
    3125             } 
    3126         } 
    3127          
    3128         /// <summary> 
    3129         ///   Looks up a localized string similar to Select Zip File. 
    3130         /// </summary> 
    3131         internal static string Language_Pack_Select_Caption { 
    3132             get { 
    3133                 return ResourceManager.GetString("Language_Pack_Select_Caption", resourceCulture); 
     3131        internal static string Language_Pack_WrongFile { 
     3132            get { 
     3133                return ResourceManager.GetString("Language_Pack_WrongFile", resourceCulture); 
    31343134            } 
    31353135        } 
  • trunk/Obi/Obi/messages.resx

    r5848 r5858  
    25392539    <value>Mark phrase</value> 
    25402540  </data> 
    2541   <data name="Transport_AddTodoAcc" xml:space="preserve"> 
    2542     <value>Mark phrase</value> 
    2543   </data> 
    2544   <data name="Language_Pack" xml:space="preserve"> 
     2541  <data name="Language_Pack_WrongFile" xml:space="preserve"> 
    25452542    <value>You have selected the wrong file</value> 
    25462543  </data> 
Note: See TracChangeset for help on using the changeset viewer.