mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
chore(plugins): remove debug logging from procrastination-buster i18n
This commit is contained in:
parent
7401116bfb
commit
213d0ec010
2 changed files with 0 additions and 6 deletions
|
|
@ -25,12 +25,9 @@ if (plugin.onMessage) {
|
|||
|
||||
// Listen for language changes and notify iframe
|
||||
plugin.registerHook('languageChange', (language: string) => {
|
||||
plugin.log.info('[plugin.ts] Language changed to:', language);
|
||||
// Notify the iframe about language change
|
||||
const iframe = document.querySelector('iframe[data-plugin-iframe]');
|
||||
plugin.log.info('[plugin.ts] Found iframe:', !!iframe);
|
||||
if (iframe && (iframe as HTMLIFrameElement).contentWindow) {
|
||||
plugin.log.info('[plugin.ts] Sending languageChanged message to iframe');
|
||||
(iframe as HTMLIFrameElement).contentWindow!.postMessage(
|
||||
{ type: 'languageChanged', language },
|
||||
'*',
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ export function useTranslate() {
|
|||
(async () => {
|
||||
try {
|
||||
const lang = await sendMessage('getCurrentLanguage');
|
||||
console.log('[useTranslate] Initial language:', lang);
|
||||
setCurrentLanguage(lang);
|
||||
} catch (error) {
|
||||
console.error('[useTranslate] Failed to get current language:', error);
|
||||
|
|
@ -76,9 +75,7 @@ export function useTranslate() {
|
|||
// Listen for language change events
|
||||
createEffect(() => {
|
||||
const handleLanguageChange = (event: MessageEvent) => {
|
||||
console.log('[useTranslate] Received event:', event.data.type);
|
||||
if (event.data.type === 'languageChanged') {
|
||||
console.log('[useTranslate] Language changed to:', event.data.language);
|
||||
setCurrentLanguage(event.data.language);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue