Skip to content

Commit

Permalink
Merge pull request #537 from 0-a-e/master
Browse files Browse the repository at this point in the history
update Japanese Translation etc.
  • Loading branch information
sunbeams001 committed May 13, 2023
2 parents 1a9a603 + 2583b39 commit 859a011
Show file tree
Hide file tree
Showing 43 changed files with 533 additions and 465 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.gradle
/local.properties
/.idea
/.history
.DS_Store
/build
/captures
Expand Down
6 changes: 6 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
[![open issues](https://img.shields.io/github/issues/CeuiLiSA/Pixiv-Shaft?color=brightgreen)](https://github.com/CeuiLiSA/Pixiv-Shaft/issues?q=is%3Aopen+is%3Aissue)
[![license](https://img.shields.io/github/license/CeuiLiSA/Pixiv-Shaft)](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/LICENSE)

[日本語(日文)](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/README/README.ja.md)


* 本应用为日本插画交流网站Pixiv的安卓客户端第三方重制版
* 项目已开源且仅做交流和学习使用,不得用于任何商业用途
* APP内所有插画、漫画、小说作品版权均归属于其著作者或Pixiv所有
Expand Down Expand Up @@ -40,12 +43,12 @@

|作品详情|推荐小说|评论列表|
|:---:|:---:|:---:|
|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-0.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-1.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-2.jpg)
|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/zh-cn/illust.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-1.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/zh-cn/comment.jpg)


|动态页面|作品详情|热门标签|
|:---:|:---:|:---:|
|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-3.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-4.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-5.jpg)
|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-3.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-4.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/zh-cn/hotTag.jpg)

## 4.在 Google Play 上获取

Expand Down
100 changes: 100 additions & 0 deletions README/README.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Shaft (サードパーティPixivクライアント)
[![release](https://img.shields.io/github/v/release/CeuiLiSA/Pixiv-Shaft)](https://github.com/CeuiLiSA/Pixiv-Shaft/releases/latest)
[![build status](https://img.shields.io/github/workflow/status/CeuiLiSA/Pixiv-Shaft/CI)](https://github.com/CeuiLiSA/Pixiv-Shaft/actions)
[![open issues](https://img.shields.io/github/issues/CeuiLiSA/Pixiv-Shaft?color=brightgreen)](https://github.com/CeuiLiSA/Pixiv-Shaft/issues?q=is%3Aopen+is%3Aissue)
[![license](https://img.shields.io/github/license/CeuiLiSA/Pixiv-Shaft)](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/LICENSE)

[中文(中国語)](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/README.md)

* このアプリは日本のイラスト特化型SNS「Pixiv」の非公式Androidクライアントです。
* このプロジェクトはオープンソースであり、当アプリを商業目的で使用することにより発生する責任に関し、一切の責任を負いません。
* アプリ内のすべてのイラスト、漫画、小説の著作権は作者またはPixivに帰属します。
* このアプリは非公式のものです。可能な限り公式のPixivアプリを使用することをお勧めします。

## 1.機能

* ログインと会員登録
* アプリ内VPN(詳しくは[Pix-EzViewer](https://github.com/Notsfsssf/Pix-EzViewer)をご確認ください)
* 非ログインでの人気順表示
* GIFの表示・保存
* 閲覧履歴の表示と保存
* マルチアカウント
* おすすめイラスト・漫画・小説・タグの表示
* イラスト、漫画、小説を人気順・新しい順・古い順で検索
* コメントの閲覧・送信・返信
* 一括ダウンロードとダウンロードリンクの表示
* 小説の閲覧
* Pixivision
* R-18コンテンツの閲覧(Pixiv側での設定が必要)
* スパムコメントのフィルタリング(初期状態では無効)
* ダークモード

## 2.特徴

* 様々なクライアントの「いいとこ取り」をした使いやすいUI
* 「人気順」表示
* スムーズなアニメーション
* 操作が簡単
* 小説の閲覧に対応
* 多言語対応

## 3.スクリーンショット


|イラスト表示ページ|おすすめの小説|コメント欄|
|:---:|:---:|:---:|
|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/ja/illust.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-1.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/ja/comment.jpg)


|新着作品のタブ|イラスト表示ページ|人気のタグ|
|:---:|:---:|:---:|
|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-3.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/QQ20200106-4.jpg)|![](https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/snap/ja/hotTag.jpg)

## 4. Google Playからダウンロード

<a href="https://play.google.com/store/apps/details?id=ceui.lisa.pixiv">
<img
alt="Get it on Google Play"
src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png"
width="330"
height="128"
/>
</a>

## 5. Githubからダウンロード

[Releases](https://github.com/CeuiLiSA/Pixiv-Shaft/releases/latest)

## 6. よくある問題とFAQ

[FAQ](./FAQ.md)


### ライセンス

This project is under the MIT License. See the [LICENSE](LICENSE) file for the full license text.

```text
MIT License
Copyright (c) 2021 CeuiLiSA
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void doSomething(Void t) {
if (!TextUtils.isEmpty(host)) {

if (host.equals("account")) {
Common.showToast("尝试登录");
Common.showToast(getString(R.string.trying_login));
String code = uri.getQueryParameter("code");
Retro.getAccountApi().newLogin(
FragmentLogin.CLIENT_ID,
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/ceui/lisa/activities/RankActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected int initLayout() {
protected void initView() {
setSupportActionBar(baseBind.toolbar);
baseBind.toolbar.setNavigationOnClickListener(v -> finish());
baseBind.toolbarTitle.setText("排行榜");
baseBind.toolbarTitle.setText(mContext.getString(R.string.ranking_illust));
dataType = getIntent().getStringExtra("dataType");
queryDate = getIntent().getStringExtra("date");
baseBind.viewPager.setPageTransformer(true, new DrawerTransformer());
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/ceui/lisa/activities/UserActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
*/
public class UserActivity extends BaseActivity<ActicityUserBinding> implements Display<UserDetailResponse> {

private UserViewModel mUserViewModel;

private UserViewModel mUserViewModel;
@Override
protected int initLayout() {
return R.layout.acticity_user;
Expand Down Expand Up @@ -117,7 +117,7 @@ public void onClick(View v) {
baseBind.userAddress.setText(Common.checkEmpty(currentUser.getProfile().getRegion()));
baseBind.userAddress.setVisibility(View.VISIBLE);
List<String> tagList = new ArrayList<>();
tagList.add(getString(R.string.string_147) + currentUser.getProfile().getTotal_mypixiv_users());
tagList.add(getString(R.string.string_235) + ": " + currentUser.getProfile().getTotal_mypixiv_users());
tagList.add(getString(R.string.string_145) + currentUser.getProfile().getTotal_follow_users());
tagList.add(getString(R.string.string_146));
baseBind.tagType.setAdapter(new TagAdapter<String>(tagList) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/ceui/lisa/adapters/ColorAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void initLayout() {
public void bindData(ColorItem target, ViewHolder<RecyColorBinding> bindView, int position) {
bindView.baseBind.card.setCardBackgroundColor(Color.parseColor(target.getColor()));
if (target.isSelect()) {
bindView.baseBind.name.setText(String.format("%s(正在使用)", target.getName()));
bindView.baseBind.name.setText(String.format("%s" + getString(R.string.theme_nowUsing), target.getName()));
} else {
bindView.baseBind.name.setText(target.getName());
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/ceui/lisa/download/IllustDownload.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static void downloadIllustFirstPageWithResolution(IllustsBean illust, Str
check(activity, () -> {
if (illust.getPage_count() == 1) {
DownloadItem item = buildDownloadItem(illust, 0, imageResolution);
Common.showToast(Shaft.getContext().getString(R.string.one_item_added));
Common.showToast('1' + Shaft.getContext().getString(R.string.has_been_added));
Manager.get().addTask(item);
}
});
Expand All @@ -86,7 +86,7 @@ public static void downloadIllustFirstPage(IllustsBean illust) {
public static void downloadIllustFirstPageWithResolution(IllustsBean illust, String imageResolution) {
if (illust.getPage_count() == 1) {
DownloadItem item = buildDownloadItem(illust, 0, imageResolution);
Common.showToast(Shaft.getContext().getString(R.string.one_item_added));
Common.showToast('1' + Shaft.getContext().getString(R.string.has_been_added));
Manager.get().addTask(item);
}
}
Expand All @@ -98,7 +98,7 @@ public static void downloadIllustCertainPage(IllustsBean illust, int index, Base
downloadIllustFirstPage(illust);
} else {
DownloadItem item = buildDownloadItem(illust, index);
Common.showToast(Shaft.getContext().getString(R.string.one_item_added));
Common.showToast('1' + Shaft.getContext().getString(R.string.has_been_added));
Manager.get().addTask(item);
}
});
Expand Down
48 changes: 23 additions & 25 deletions app/src/main/java/ceui/lisa/fragments/FragmentColors.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.ArrayList;
import java.util.List;

import ceui.lisa.R;
import ceui.lisa.activities.Shaft;
import ceui.lisa.adapters.BaseAdapter;
import ceui.lisa.adapters.ColorAdapter;
Expand Down Expand Up @@ -38,34 +39,31 @@ public List<ColorItem> next() {
public List<ColorItem> getList() {
List<ColorItem> itemList = new ArrayList<>();
int current = Shaft.sSettings.getThemeIndex();
itemList.add(new ColorItem(0, COLOR_NAMES[0], "#686bdd", current == 0));
itemList.add(new ColorItem(1, COLOR_NAMES[1], "#56baec", current == 1));
itemList.add(new ColorItem(2, COLOR_NAMES[2], "#008BF3", current == 2));
itemList.add(new ColorItem(3, COLOR_NAMES[3], "#03d0bf", current == 3));
itemList.add(new ColorItem(4, COLOR_NAMES[4], "#fee65e", current == 4));
itemList.add(new ColorItem(5, COLOR_NAMES[5], "#fe83a2", current == 5));
itemList.add(new ColorItem(6, COLOR_NAMES[6], "#f44336", current == 6));
itemList.add(new ColorItem(7, COLOR_NAMES[7], "#673AB7", current == 7));
itemList.add(new ColorItem(8, COLOR_NAMES[8], "#4CAF50", current == 8));
itemList.add(new ColorItem(9, COLOR_NAMES[9], "#E91E63", current == 9));
itemList.add(new ColorItem(0, getString(COLOR_NAME_CODES[0]), "#686bdd", current == 0));
itemList.add(new ColorItem(1, getString(COLOR_NAME_CODES[1]), "#56baec", current == 1));
itemList.add(new ColorItem(2, getString(COLOR_NAME_CODES[2]), "#008BF3", current == 2));
itemList.add(new ColorItem(3, getString(COLOR_NAME_CODES[3]), "#03d0bf", current == 3));
itemList.add(new ColorItem(4, getString(COLOR_NAME_CODES[4]), "#fee65e", current == 4));
itemList.add(new ColorItem(5, getString(COLOR_NAME_CODES[5]), "#fe83a2", current == 5));
itemList.add(new ColorItem(6, getString(COLOR_NAME_CODES[6]), "#f44336", current == 6));
itemList.add(new ColorItem(7, getString(COLOR_NAME_CODES[7]), "#673AB7", current == 7));
itemList.add(new ColorItem(8, getString(COLOR_NAME_CODES[8]), "#4CAF50", current == 8));
itemList.add(new ColorItem(9, getString(COLOR_NAME_CODES[9]), "#E91E63", current == 9));
return itemList;
}

public static String[] COLOR_NAMES = new String[]{
"矢尹紫", //纪念尹子烨(尹桂祥)
"经典蓝",
"官方蓝",
"浅葱绿",
"盛夏黄",
"樱桃粉",
"元气红",
"基佬紫",
"老实绿",
"少女粉"
public static int[] COLOR_NAME_CODES = new int[]{
R.string.color_shiYinPurple, //纪念尹子烨(尹桂祥)
R.string.color_classicBlue,
R.string.color_officialBlue,
R.string.color_scallionGreen,
R.string.color_summerYellow,
R.string.color_peachPink,
R.string.color_activeRed,
R.string.color_classicPurple,
R.string.color_classicGreen,
R.string.color_girlPink
};

@Override
public String getToolbarTitle() {
return "主题颜色";
}
public String getToolbarTitle() {return getString(R.string.string_324);}
}
6 changes: 3 additions & 3 deletions app/src/main/java/ceui/lisa/fragments/FragmentHolder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ class FragmentHolder : BaseFragment<FragmentHolderBinding>() {

when {
data.userId == Shaft.sUserModel.user.id -> {
titles = arrayOf("收藏", "其他")
titles = arrayOf(getString(R.string.userTab_collection), getString(R.string.userTab_other))
items = arrayOf<Fragment>(
FragmentLikeIllust.newInstance(data.userId, Params.TYPE_PUBLIC),
FragmentUserRight()
)
}
data.profile.total_manga > 0 -> {
titles = arrayOf("插画", "漫画", "其他")
titles = arrayOf(getString(R.string.type_illust), getString(R.string.type_manga), getString(R.string.userTab_other))
items = arrayOf<Fragment>(
FragmentUserIllust.newInstance(data.userId, false),
FragmentUserManga.newInstance(data.userId, false),
FragmentUserRight()
)
}
else -> {
titles = arrayOf("插画", "其他")
titles = arrayOf(getString(R.string.type_illust), getString(R.string.userTab_other))
items = arrayOf<Fragment>(
FragmentUserIllust.newInstance(data.userId, false),
FragmentUserRight()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void initView() {
baseBind.recyclerView.addItemDecoration(new
LinearItemHorizontalDecoration(DensityUtil.dp2px(8.0f)));
if (type == 1) {
baseBind.title.setText(R.string.string_168);
baseBind.title.setText(R.string.string_237);
baseBind.howMany.setText(String.format(getString(R.string.how_many_illust_works), novelSize));
baseBind.howMany.setOnClickListener(new View.OnClickListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ public void initRecyclerView() {

@Override
public String getToolbarTitle() {
return getString(R.string.string_239) + dataType;
return getString(R.string.recommend) + dataType;
}

@Override
public boolean showToolbar() {
return getString(R.string.string_240).equals(dataType);
return getString(R.string.type_manga).equals(dataType);
}

@Override
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/ceui/lisa/fragments/FragmentSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
@Override
public void onClick(View v) {
FileUtils.deleteAllInDir(LegacyFile.imageCacheFolder(mContext));
Common.showToast("图片缓存清除成功!");
Common.showToast(getString(R.string.success_clearImageCache));
baseBind.imageCacheSize.setText(FileUtils.getSize(LegacyFile.imageCacheFolder(mContext)));
}
});
Expand All @@ -988,7 +988,7 @@ public void onClick(View v) {
@Override
public void onClick(View v) {
FileUtils.deleteAllInDir(LegacyFile.gifCacheFolder(mContext));
Common.showToast("GIF缓存清除成功!", 2);
Common.showToast(getString(R.string.success_clearGifCache), 2);
baseBind.gifCacheSize.setText(FileUtils.getSize(LegacyFile.gifCacheFolder(mContext)));
}
});
Expand Down Expand Up @@ -1017,7 +1017,7 @@ public void onClick(QMUIDialog dialog, int index) {
IllustDownload.downloadBackupFile((BaseActivity<?>) mActivity, "Shaft-Backup.json", backupString, new Callback<Uri>() {
@Override
public void doSomething(Uri t) {
Common.showToast("备份成功 " + Settings.FILE_PATH_BACKUP);
Common.showToast(getString(R.string.backup_success) + Settings.FILE_PATH_BACKUP);
}
});
dialog.dismiss();
Expand Down Expand Up @@ -1081,7 +1081,7 @@ private void setOrderName() {

private void setThemeName() {
final int index = Shaft.sSettings.getThemeIndex();
baseBind.colorSelect.setText(FragmentColors.COLOR_NAMES[index]);
baseBind.colorSelect.setText(getString(FragmentColors.COLOR_NAME_CODES[index]));
}

private void updateIllustPathUI(){
Expand All @@ -1104,7 +1104,7 @@ public void onActivityResult(int requestCode, int resultCode, @Nullable @org.jet
Uri uri = data.getData();
String fileString = new String(UriUtils.uri2Bytes(uri));
boolean restoreResult = BackupUtils.restoreBackups(mContext, fileString);
Common.showToast(restoreResult ? "还原成功" : "还原失败");
Common.showToast(restoreResult ? getString(R.string.restore_success) : getString(R.string.restore_failed));
} catch (Exception e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 859a011

Please sign in to comment.