mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-31 16:02:43 +01:00 
			
		
		
		
	Revert "Issue#1552. Calendar module, LC_TIME variable"
This reverts commit 448b413eca.
			
			
This commit is contained in:
		| @@ -66,12 +66,17 @@ waybar::modules::Clock::Clock(const std::string& id, const Json::Value& config) | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   const char* applyLocale{config_["locale"].isString() ? config_["locale"].asCString() : getenv("LC_TIME")}; |   if (config_["locale"].isString()) { | ||||||
|   try { |     locale_ = std::locale(config_["locale"].asString()); | ||||||
|     locale_ = applyLocale ? std::locale(applyLocale) : std::locale(""); |   } else { | ||||||
|   } catch(std::runtime_error const& localeE) { |     char* sysLocale{getenv("LC_TIME")}; | ||||||
|     spdlog::warn("Clock module. Wrong \"locale\" or LC_TIME variable(make sure locale is presented in /etc/locale.gen and generated by the locale-gen). Trace: {0}", localeE.what()); |     try { | ||||||
|     locale_ = std::locale(); |       locale_ = sysLocale ? std::locale(sysLocale) : std::locale(""); | ||||||
|  |     } | ||||||
|  |     catch(std::runtime_error const& localeErr) { | ||||||
|  |       spdlog::warn(localeErr.what()); | ||||||
|  |       locale_ = std::locale(); | ||||||
|  |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   thread_ = [this] { |   thread_ = [this] { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Viktar Lukashonak
					Viktar Lukashonak