OSDN Git Service
(root)
/
opentween
/
open-tween.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c079838
)
発言一覧内で pic.twitter.com に対応する alt_text が存在するものはテキストを置き換える
author
Kimura Youichi
<kim.upsilon@bucyou.net>
Wed, 30 Mar 2016 16:09:28 +0000
(
01:09
+0900)
committer
Kimura Youichi
<kim.upsilon@bucyou.net>
Sun, 3 Apr 2016 11:06:05 +0000
(20:06 +0900)
OpenTween/ApplicationEvents.cs
patch
|
blob
|
history
OpenTween/Properties/Resources.Designer.cs
patch
|
blob
|
history
OpenTween/Properties/Resources.en.resx
patch
|
blob
|
history
OpenTween/Properties/Resources.resx
patch
|
blob
|
history
OpenTween/Resources/ChangeLog.txt
patch
|
blob
|
history
OpenTween/Twitter.cs
patch
|
blob
|
history
diff --git
a/OpenTween/ApplicationEvents.cs
b/OpenTween/ApplicationEvents.cs
index
18de7d7
..
21bae9b
100644
(file)
--- a/
OpenTween/ApplicationEvents.cs
+++ b/
OpenTween/ApplicationEvents.cs
@@
-205,21
+205,16
@@
namespace OpenTween
}
}
}
}
- public static void InitCulture(string code)
- {
- try
- {
- Thread.CurrentThread.CurrentUICulture = new CultureInfo(code);
- }
- catch (Exception)
- {
- }
- }
public static void InitCulture()
{
try
{
public static void InitCulture()
{
try
{
- if (CultureCode != "OS") Thread.CurrentThread.CurrentUICulture = new CultureInfo(CultureCode);
+ var culture = CultureInfo.CurrentCulture;
+ if (CultureCode != "OS")
+ culture = new CultureInfo(CultureCode);
+
+ CultureInfo.DefaultThreadCurrentUICulture = culture;
+ Thread.CurrentThread.CurrentUICulture = culture;
}
catch (Exception)
{
}
catch (Exception)
{
diff --git
a/OpenTween/Properties/Resources.Designer.cs
b/OpenTween/Properties/Resources.Designer.cs
index
a6d6590
..
a6dc704
100644
(file)
--- a/
OpenTween/Properties/Resources.Designer.cs
+++ b/
OpenTween/Properties/Resources.Designer.cs
@@
-1421,6
+1421,15
@@
namespace OpenTween.Properties {
}
/// <summary>
}
/// <summary>
+ /// [画像: {0}] に類似しているローカライズされた文字列を検索します。
+ /// </summary>
+ internal static string ImageAltText {
+ get {
+ return ResourceManager.GetString("ImageAltText", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
/// </summary>
internal static System.Drawing.Bitmap InitialImage {
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
/// </summary>
internal static System.Drawing.Bitmap InitialImage {
diff --git
a/OpenTween/Properties/Resources.en.resx
b/OpenTween/Properties/Resources.en.resx
index
93906fe
..
7ff3015
100644
(file)
--- a/
OpenTween/Properties/Resources.en.resx
+++ b/
OpenTween/Properties/Resources.en.resx
@@
-1131,4
+1131,7
@@
Available service: {1}</value>
<data name="SendErrorReport_DmSendError" xml:space="preserve">
<value>Failed to send DM.</value>
</data>
<data name="SendErrorReport_DmSendError" xml:space="preserve">
<value>Failed to send DM.</value>
</data>
+ <data name="ImageAltText" xml:space="preserve">
+ <value>[Image: {0}]</value>
+ </data>
</root>
\ No newline at end of file
</root>
\ No newline at end of file
diff --git
a/OpenTween/Properties/Resources.resx
b/OpenTween/Properties/Resources.resx
index
be08c65
..
0343910
100644
(file)
--- a/
OpenTween/Properties/Resources.resx
+++ b/
OpenTween/Properties/Resources.resx
@@
-1189,4
+1189,7
@@
<data name="SendErrorReport_DmSendError" xml:space="preserve">
<value>DM の送信に失敗しました</value>
</data>
<data name="SendErrorReport_DmSendError" xml:space="preserve">
<value>DM の送信に失敗しました</value>
</data>
+ <data name="ImageAltText" xml:space="preserve">
+ <value>[画像: {0}]</value>
+ </data>
</root>
\ No newline at end of file
</root>
\ No newline at end of file
diff --git
a/OpenTween/Resources/ChangeLog.txt
b/OpenTween/Resources/ChangeLog.txt
index
e777033
..
cb1861b
100644
(file)
--- a/
OpenTween/Resources/ChangeLog.txt
+++ b/
OpenTween/Resources/ChangeLog.txt
@@
-3,6
+3,7
@@
==== Ver 1.3.2-dev(2016/xx/xx)
* NEW: touch.pixiv.net のサムネイル表示に対応 (pixiv.net は既に対応しています)
* NEW: pic.twitter.com の画像に設定された代替テキストの取得に対応
==== Ver 1.3.2-dev(2016/xx/xx)
* NEW: touch.pixiv.net のサムネイル表示に対応 (pixiv.net は既に対応しています)
* NEW: pic.twitter.com の画像に設定された代替テキストの取得に対応
+ - 代替テキストが設定された画像の場合、発言一覧に含まれる画像 URL が代替テキストに置き換わって表示されます
* FIX: 投稿欄の複数行入力が有効かつCtrl+Enterで投稿する設定の状態でハッシュタグの自動付与が行われない不具合を修正 (thx @nt776!)
* FIX: タブレット端末などでサムネイル画像が1枚のみ表示された状態で2本指スクロールするとエラーが発生する問題を回避
* FIX: 発言詳細部に表示されるハッシュタグやメンションで「URLをコピー」が機能しない不具合を修正 (thx @ufoprincess!)
* FIX: 投稿欄の複数行入力が有効かつCtrl+Enterで投稿する設定の状態でハッシュタグの自動付与が行われない不具合を修正 (thx @nt776!)
* FIX: タブレット端末などでサムネイル画像が1枚のみ表示された状態で2本指スクロールするとエラーが発生する問題を回避
* FIX: 発言詳細部に表示されるハッシュタグやメンションで「URLをコピー」が機能しない不具合を修正 (thx @ufoprincess!)
diff --git
a/OpenTween/Twitter.cs
b/OpenTween/Twitter.cs
index
724af75
..
0b70410
100644
(file)
--- a/
OpenTween/Twitter.cs
+++ b/
OpenTween/Twitter.cs
@@
-2246,7
+2246,14
@@
namespace OpenTween
{
foreach (var m in entities.Media)
{
{
foreach (var m in entities.Media)
{
- if (!string.IsNullOrEmpty(m.DisplayUrl)) text = text.Replace(m.Url, m.DisplayUrl);
+ if (m.AltText != null)
+ {
+ text = text.Replace(m.Url, string.Format(Properties.Resources.ImageAltText, m.AltText));
+ }
+ else
+ {
+ if (!string.IsNullOrEmpty(m.DisplayUrl)) text = text.Replace(m.Url, m.DisplayUrl);
+ }
}
}
}
}
}
}