diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c732cf..9d85997 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [v1.1.1](https://github.com/jonathontoon/tweet-tray/releases/tag/v1.1.1) + +A few quick improvements + +- Fix an null error for window positioning at specific screen scales (#156) +- Added support for Spanish (#158) (Thanks @nil!) + ## [v1.1.0](https://github.com/jonathontoon/tweet-tray/releases/tag/v1.1.0) It's been awhile since our last release, but hopefully this one is well worth it. Along with a number of small features and improvements we now have support for 7 languages! diff --git a/README.md b/README.md index 180529e..a8a86a4 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,10 @@ Tweet Tray is a small application which allows you to tweet from your desktop sy ## Downloads -#### 馃崕 [MacOS](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.0.dmg) -#### 馃彣 [Windows](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.0.exe) -#### 馃惂 [Linux (AppImage)](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.0.AppImage) -#### 馃惂 [Linux (DEB File)](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.0.deb) +#### 馃崕 [MacOS](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.1.dmg) +#### 馃彣 [Windows](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.1.exe) +#### 馃惂 [Linux (AppImage)](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.1.AppImage) +#### 馃惂 [Linux (DEB File)](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.1.deb) See [releases](https://github.com/jonathontoon/tweet-tray/releases) for more information. diff --git a/app/MenuBarManager.js b/app/MenuBarManager.js index f17c9d0..1a9bc08 100644 --- a/app/MenuBarManager.js +++ b/app/MenuBarManager.js @@ -4,6 +4,8 @@ import { app, BrowserWindow, Tray, screen, nativeImage, Menu, globalShortcut, } import { SelectionMenu, InputMenu, ApplicationMenu, } from './utils/Menu'; +import * as constants from './constants'; + class MenuBarManager { constructor() { this.window = null; @@ -56,8 +58,8 @@ class MenuBarManager { _createWindow() { this.window = new BrowserWindow({ - width: 348, - height: 520, + width: constants.WINDOW_WIDTH, + height: constants.WINDOW_HEIGHT, resizable: false, frame: false, show: false, @@ -152,7 +154,7 @@ class MenuBarManager { // Vertical or Horizontal Taskbar // Vertical Taskbar, small icon mode isn't applicable - if (trayBounds.height === 32) { + if (trayBounds.height === 32 || trayBounds.height === 33) { if (trayBounds.x <= halfScreenWidth && trayBounds.y >= halfScreenHeight) { // Vertical Left Bottom @@ -169,7 +171,7 @@ class MenuBarManager { // Horizontal Taskbar // Supporting small or regular sized icons - } else if (trayBounds.height === 30 || trayBounds.height === 40) { + } else if (trayBounds.height === 30 || trayBounds.height === 31 || trayBounds.height === 40) { // Is bottom or top if (trayBounds.x >= halfScreenWidth && trayBounds.y >= halfScreenHeight) { // Horizontal Bottom Left diff --git a/app/OAuthManager.js b/app/OAuthManager.js index 3b14bdd..c64bbb7 100644 --- a/app/OAuthManager.js +++ b/app/OAuthManager.js @@ -4,6 +4,8 @@ import electron, { BrowserWindow, nativeImage, } from 'electron'; import { selectionMenu, inputMenu, } from './utils/Menu'; +import * as constants from './constants'; + class OAuthManager { constructor(config, mainWindow) { this.consumerKey = config.OAUTH_CONSUMER_KEY; @@ -56,7 +58,7 @@ class OAuthManager { const window = new BrowserWindow({ width: 380, - height: 520, + height: constants.WINDOW_HEIGHT, x, y, show: false, @@ -84,6 +86,7 @@ class OAuthManager { this.isOAuthActive = false; window == null; }); + return window; } diff --git a/app/components/Composer.jsx b/app/components/Composer.jsx index c9f56d8..4e7c3dd 100644 --- a/app/components/Composer.jsx +++ b/app/components/Composer.jsx @@ -126,8 +126,6 @@ class Composer extends Component { } startPostStatus(e) { - console.log('postStatus'); - const { renderProcess, accessTokenPair, diff --git a/app/constants.js b/app/constants.js index 2191544..c8096fa 100644 --- a/app/constants.js +++ b/app/constants.js @@ -1,3 +1,5 @@ +export const WINDOW_WIDTH = 348; +export const WINDOW_HEIGHT = 520; export const XTRA_LARGE_FONT_SIZE = process.platform === 'darwin' ? 24 : 22; export const LARGE_FONT_SIZE = 16; export const REGULAR_FONT_SIZE = 15; diff --git a/app/localizations/es.json b/app/localizations/es.json new file mode 100644 index 0000000..b265bb5 --- /dev/null +++ b/app/localizations/es.json @@ -0,0 +1,51 @@ +{ + "post_status_success": { + "title": "Tu tweet se ha publicado!", + "description": "Clica aqu铆 para verlo." + }, + "post_status_error": { + "title": "Lo siento, un error ha ocurrido!", + "description": "Tu tweet no se pudo enviar." + }, + "login": { + "title_taskbar": "Env铆a tweets r谩pido desde la barra de tareas, sin distracciones.", + "title_menubar": "Env铆a tweets r谩pido desde la barra de menus, sin distracciones.", + "log_in_button": "Iniciar sesi贸n con Twitter", + "quit_button": "Salir de Tweet Tray" + }, + "authorization_code": { + "title": "Entra los 7 d铆gitos del PIN de autorizaci贸n que se muestra en la ventana emergente.", + "authorize_button": "Autoriza my Cuenta", + "return_button": "Volver a iniciar sesi贸n" + }, + "authorization_error": { + "title": "Lo siento, un error ha ocurrido!", + "description": "Tu cuenta no ha podido ser autorizada." + }, + "composer": { + "title": "Comp贸n Tweet", + "placeholder": "驴Qu茅 est谩 pasando?", + "settings_alt_text": "Abrir configuraci贸n", + "image_alt_text": "A帽adir una imagen", + "tweet_button": "Twittear" + }, + "image_dialog": { + "title": "Seleccionar una imagen", + "add_button": "A帽adir", + "file_type": "Imagenes", + "warning_title": "Atenci贸n", + "warning_message": "Lo siento, no puedes hacer esto", + "warning_detail_images": "Las im谩genes tienen que ser menores de 5mb.", + "warning_detail_gif": "Los GIFs tienen que ser menores de 10mb.", + "warning_confirm_button": "OK" + }, + "settings": { + "title": "Configuraci贸n", + "night_mode_action": "Modo nocturno", + "launch_start_up_action": "Ejecutar al iniciar", + "read_faq_action": "Lee FAQ", + "report_issue_action": "Reportar un fallo", + "quit_action": "Salir de Tweet Tray", + "log_out_action": "Cerrar sesi贸n" + } +} diff --git a/app/main.dev.js b/app/main.dev.js index b0da867..5e11ae5 100644 --- a/app/main.dev.js +++ b/app/main.dev.js @@ -170,8 +170,6 @@ ipcMain.on('postStatus', (postStatusEvent, response) => { media_ids: uploadResponse.media_id_string, }, accessToken, accessTokenSecret, (updateStatusError, statusResponse) => { if (updateStatusError) { - console.log('with image'); - console.log(updateStatusError); postStatusEvent.sender.send('postStatusError', statusResponse); return; } @@ -183,8 +181,6 @@ ipcMain.on('postStatus', (postStatusEvent, response) => { status: response.statusText, }, accessToken, accessTokenSecret, (updateStatusError, statusResponse) => { if (updateStatusError) { - console.log('no image'); - console.log(updateStatusError); postStatusEvent.sender.send('postStatusError', statusResponse); return; } diff --git a/app/package.json b/app/package.json index a2b814f..def283f 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "tweet-tray", "productName": "Tweet Tray", - "version": "1.1.0", + "version": "1.1.1", "description": "Tweet quickly from the desktop without any more distractions.", "main": "./main.prod.js", "author": { diff --git a/app/utils/LocaleManager.js b/app/utils/LocaleManager.js index 440ee08..a9d4f36 100644 --- a/app/utils/LocaleManager.js +++ b/app/utils/LocaleManager.js @@ -1,5 +1,7 @@ import LocalizedStrings from 'react-localization'; +import spanish from '../localizations/es.json'; + import english from '../localizations/en.json'; import englishAU from '../localizations/en-AU.json'; import englishCA from '../localizations/en-CA.json'; @@ -29,10 +31,10 @@ import japanese from '../localizations/ja.json'; import dutch from '../localizations/nl.json'; - class LocaleManager { constructor() { return new LocalizedStrings({ + es: spanish, en: english, 'en-AU': englishAU, 'en-CA': englishCA, diff --git a/package.json b/package.json index a52ccf6..8ef430f 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "email": "jonathontoon@gmail.com", "url": "https://github.com/jonathontoon" }, - "version": "1.1.0", + "version": "1.1.1", "private": true, "scripts": { "build": "concurrently \"npm run build-main\" \"npm run build-renderer\"",