Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in the Japanese translations to the release branch. #457

Open
wants to merge 72 commits into
base: R1_10_1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
e410b46
Images showing the new "optical tube" or "pointer mode"
jaydeetay Dec 31, 2021
3be0649
Rneame the added image files.
jaydeetay Dec 31, 2021
d38f367
...whoops. These are the missing files.
jaydeetay Dec 31, 2021
6d7bc47
Updated Polish translation (#454)
Aga-C Jan 1, 2022
7b322a0
update Japanese translation (#456)
argrath Jan 2, 2022
89b8c26
Clean up a couple of classes with some lateinits. Would do more if i…
jaydeetay Jan 2, 2022
f12165d
Just reformat the Skyrenderer layout.
jaydeetay Jan 3, 2022
e381781
Half done attempt to modernize the activities.
jaydeetay Jan 3, 2022
2bce65e
Didn't intend to commit to master.
jaydeetay Jan 3, 2022
b19e123
Added the upcoming north american eclipse and removed a few events from
jaydeetay Feb 11, 2024
fbc51ad
Updated Turkish translation (#484)
srcemre Feb 11, 2024
a9ceb00
Addeclipsemap (#488)
jaydeetay Feb 11, 2024
d49620d
Edited the Turkish translations to reflect the new Eclipse entry.
jaydeetay Feb 11, 2024
b4f0314
Updated Polish translation (#489)
Aga-C Feb 17, 2024
7c88c49
Spanish updates (#492)
VegaDark Feb 28, 2024
731b200
1.10.2 rc1 (#496)
jaydeetay May 1, 2024
7a51e89
1.10.3 rc1 (#497)
jaydeetay May 3, 2024
8821f6b
Update android.yml
jaydeetay May 3, 2024
5bc1a54
Update android.yml
jaydeetay May 3, 2024
2e7c9ab
Update android.yml
jaydeetay May 3, 2024
8669841
Update android.yml
jaydeetay May 3, 2024
378b11e
Update android.yml
jaydeetay May 3, 2024
e97e9fe
Update android.yml
jaydeetay May 3, 2024
41f58e9
Update android.yml
jaydeetay May 3, 2024
b7115f5
Update android.yml
jaydeetay May 3, 2024
f8d455d
Attempt to fix some sync issues and an NPE that are showing up in the
jaydeetay May 5, 2024
c80c67a
Norwegian translation update (#502)
FTno Nov 6, 2024
99913c2
Norwegian translation update - arrays (#504)
FTno Nov 6, 2024
a4bb943
Norwegian translation update (#505)
FTno Nov 6, 2024
02c7879
Update android.yml
jaydeetay Nov 6, 2024
4161ed8
Update version number
jaydeetay Nov 6, 2024
213ac22
Replace http by https in the help text so that links work again. (#516)
jaydeetay Nov 30, 2024
8b7488b
Fixlocation (#517)
jaydeetay Nov 30, 2024
5867093
update version code prior to release
jaydeetay Nov 30, 2024
3292539
Update README.md
jaydeetay Nov 30, 2024
dadc41f
Update android.yml
jaydeetay Dec 1, 2024
d4f31fa
Upgrade just about everything, including rewriting the gradle files. …
jaydeetay Dec 4, 2024
7151c4e
Try disabling dimming as an experiment.
jaydeetay Dec 4, 2024
5c342c9
This time just disable the dimming, not the red mode.
jaydeetay Dec 4, 2024
92938bd
Adding menu options.
jaydeetay Dec 5, 2024
feabaf1
trytofixborkedui (#520)
jaydeetay Dec 10, 2024
a45b7c3
Update build.gradle
jaydeetay Dec 10, 2024
4e93bd1
Check this.
jaydeetay Dec 13, 2024
ac8cd4f
Working on getting options for the dimness level.
jaydeetay Dec 15, 2024
b2a176a
So much boilerplate to inject some activities.
jaydeetay Dec 23, 2024
748afc6
Made other activities dim too.
jaydeetay Dec 23, 2024
2798fce
Removed dead comments
jaydeetay Dec 23, 2024
f99dac9
Add options for dimming. (#519)
jaydeetay Dec 23, 2024
5616527
Merge remote-tracking branch 'origin/master'
jaydeetay Dec 23, 2024
a81999a
Merge branch 'redmodeblindness'
jaydeetay Dec 23, 2024
d588b89
Update build.gradle
jaydeetay Dec 23, 2024
126fb46
Merge branch 'master' into redmodeblindness (#521)
jaydeetay Dec 24, 2024
9e5797a
Update strings.xml (#523)
VasilisKos Dec 26, 2024
8171ea4
Update arrays.xml (#522)
VasilisKos Dec 26, 2024
da09f46
Plumb through preferences into the layers so that font size can be se…
jaydeetay Dec 26, 2024
1cb9438
Update build.gradle
jaydeetay Dec 26, 2024
9dfa294
Create troubleshooting.md
jaydeetay Dec 28, 2024
10cfbdf
Added a little documentation to LabelMaker.
Jan 1, 2025
a920130
Merge remote-tracking branch 'origin/master'
Jan 1, 2025
a75f7b9
Fixed rendering problem or long labels (#528)
Aulddays Jan 1, 2025
76f4343
Merge remote-tracking branch 'origin/master'
Jan 1, 2025
3eb6784
Add extra font sizes. (#526)
jaydeetay Jan 1, 2025
135259a
Bump the version number.
Jan 2, 2025
5d7e7c7
Update arrays.xml (#529)
VasilisKos Jan 5, 2025
dc2297b
Update strings.xml (#530)
VasilisKos Jan 5, 2025
f34d851
Make the location controller do slower work on a background thread. (…
jaydeetay Jan 5, 2025
ce2800d
Update build.gradle
jaydeetay Jan 5, 2025
6629541
Remembered to update the whats new text and bumped version again.
Jan 6, 2025
0259b63
Upgrade Gradle.
Jan 7, 2025
8720a10
remove trailing line
Jan 7, 2025
5c601c1
Fix the build I broke with a badly formatted file because I don't fol…
Jan 7, 2025
a33bf84
Locationbugfix (#531)
jaydeetay Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,38 +40,33 @@ import javax.inject.Inject
* @author John Taylor
*/
class StardroidApplication : Application() {
@JvmField
@Inject
var preferences: SharedPreferences? = null
lateinit var preferences: SharedPreferences

// We keep a reference to this just to start it initializing.
@JvmField
@Inject
var layerManager: LayerManager? = null
lateinit var layerManager: LayerManager

@JvmField
@Inject
var analytics: AnalyticsInterface? = null
lateinit var analytics: AnalyticsInterface

@JvmField
@Inject
@JvmField
var sensorManager: SensorManager? = null

// We need to maintain references to this object to keep it from
// getting gc'd.
@JvmField
@Inject
var preferenceChangeAnalyticsTracker: PreferenceChangeAnalyticsTracker? = null
var applicationComponent: ApplicationComponent? = null
private set
lateinit var preferenceChangeAnalyticsTracker: PreferenceChangeAnalyticsTracker

val applicationComponent: ApplicationComponent = DaggerApplicationComponent.builder()
.applicationModule(ApplicationModule(this))
.build()

override fun onCreate() {
Log.d(TAG, "StardroidApplication: onCreate")
super.onCreate()
applicationComponent = DaggerApplicationComponent.builder()
.applicationModule(ApplicationModule(this))
.build()
applicationComponent?.inject(this)
applicationComponent.inject(this)
Log.i(
TAG, "OS Version: " + Build.VERSION.RELEASE
+ "(" + Build.VERSION.SDK_INT + ")"
Expand All @@ -88,27 +83,27 @@ class StardroidApplication : Application() {
}

private fun setUpAnalytics(versionName: String) {
(analytics ?: return).setEnabled((preferences ?: return).getBoolean(AnalyticsInterface.PREF_KEY, true))
analytics.setEnabled(preferences.getBoolean(AnalyticsInterface.PREF_KEY, true))

// Ugly hack since this isn't injectable
PreferencesButton.setAnalytics(analytics)
var previousVersion = preferences?.getString(PREVIOUS_APP_VERSION_PREF, NONE)
var previousVersion = preferences.getString(PREVIOUS_APP_VERSION_PREF, NONE)
var newUser = false
if (previousVersion == NONE) {
// It's possible a previous version exists, it's just that it wasn't a recent enough
// version to have set PREVIOUS_APP_VERSION_PREF. If so, we should see that the TOS
// have been accepted.
val oldPreviousVersionKey = "read_tos"
if (preferences!!.contains(oldPreviousVersionKey)) {
if (preferences.contains(oldPreviousVersionKey)) {
previousVersion = UNKNOWN
} else {
// Best guess that this is the first every run of a new user.
// Could also be someone with a new device.
newUser = true
}
}
analytics?.setUserProperty(AnalyticsInterface.NEW_USER, java.lang.Boolean.toString(newUser))
preferences!!.edit().putString(PREVIOUS_APP_VERSION_PREF, versionName).apply()
analytics.setUserProperty(AnalyticsInterface.NEW_USER, java.lang.Boolean.toString(newUser))
preferences.edit().putString(PREVIOUS_APP_VERSION_PREF, versionName).apply()
if (previousVersion != versionName) {
// It's either an upgrade or a new installation
Log.d(TAG, "New installation: version $versionName")
Expand All @@ -118,13 +113,13 @@ class StardroidApplication : Application() {
// It will be interesting to see *when* people use Sky Map.
val b = Bundle()
b.putInt(AnalyticsInterface.START_EVENT_HOUR, Calendar.getInstance()[Calendar.HOUR_OF_DAY])
analytics?.trackEvent(AnalyticsInterface.START_EVENT, b)
preferences!!.registerOnSharedPreferenceChangeListener(preferenceChangeAnalyticsTracker)
analytics.trackEvent(AnalyticsInterface.START_EVENT, b)
preferences.registerOnSharedPreferenceChangeListener(preferenceChangeAnalyticsTracker)
}

override fun onTerminate() {
super.onTerminate()
analytics?.setEnabled(false)
analytics.setEnabled(false)
}// TODO(jontayler): update to use the info created by gradle.

/**
Expand Down Expand Up @@ -165,7 +160,9 @@ class StardroidApplication : Application() {
private fun performFeatureCheck() {
if (sensorManager == null) {
Log.e(TAG, "No sensor manager")
analytics?.setUserProperty(AnalyticsInterface.DEVICE_SENSORS, AnalyticsInterface.DEVICE_SENSORS_NONE)
analytics.setUserProperty(
AnalyticsInterface.DEVICE_SENSORS, AnalyticsInterface.DEVICE_SENSORS_NONE
)
return
}
// Reported available sensors
Expand All @@ -184,7 +181,7 @@ class StardroidApplication : Application() {
}

// TODO: Change to String.join once we're at API > 26
analytics?.setUserProperty(
analytics.setUserProperty(
AnalyticsInterface.DEVICE_SENSORS, TextUtils.join("|", reportedSensors)
)

Expand All @@ -207,8 +204,8 @@ class StardroidApplication : Application() {
}

// Enable Gyro if available and user hasn't already disabled it.
if (!preferences!!.contains(ApplicationConstants.SHARED_PREFERENCE_DISABLE_GYRO)) {
preferences!!.edit().putBoolean(
if (!preferences.contains(ApplicationConstants.SHARED_PREFERENCE_DISABLE_GYRO)) {
preferences.edit().putBoolean(
ApplicationConstants.SHARED_PREFERENCE_DISABLE_GYRO, !hasRotationSensor
).apply()
}
Expand All @@ -217,7 +214,7 @@ class StardroidApplication : Application() {
Log.d(TAG, "All sensors:")
val allSensors = sensorManager?.getSensorList(Sensor.TYPE_ALL)
val sensorTypes: MutableSet<String> = HashSet()
for (sensor in allSensors?: emptyList()) {
for (sensor in allSensors ?: emptyList()) {
Log.i(TAG, sensor.name)
sensorTypes.add(getSafeNameForSensor(sensor))
}
Expand All @@ -242,7 +239,7 @@ class StardroidApplication : Application() {
dummy, sensor, SensorManager.SENSOR_DELAY_UI
) ?: false
if (!success) {
analytics?.setUserProperty(AnalyticsInterface.SENSOR_LIAR, "true")
analytics.setUserProperty(AnalyticsInterface.SENSOR_LIAR, "true")
}
sensorManager?.unregisterListener(dummy)
return success
Expand All @@ -258,8 +255,6 @@ class StardroidApplication : Application() {
* Returns either the name of the sensor or a string version of the sensor type id, depending
* on the supported OS level along with some context.
*/
fun getSafeNameForSensor(sensor: Sensor): String {
return "Sensor type: ${sensor.stringType}: ${sensor.type}"
}
fun getSafeNameForSensor(sensor: Sensor) = "Sensor type: ${sensor.stringType}: ${sensor.type}"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import javax.inject.Inject
class SearchTermsProvider : ContentProvider() {
data class SearchTerm(var query: String, var origin: String)

@JvmField
@Inject
var layerManager: LayerManager? = null
lateinit var layerManager: LayerManager

override fun onCreate(): Boolean {
maybeInjectMe()
return true
Expand All @@ -50,7 +50,7 @@ class SearchTermsProvider : ContentProvider() {
return true
}
val appContext = context?.applicationContext as? StardroidApplication ?: return false
val component = appContext.applicationComponent ?: return false
val component = appContext.applicationComponent
component.inject(this)
alreadyInjected = true
return true
Expand Down Expand Up @@ -83,7 +83,7 @@ class SearchTermsProvider : ContentProvider() {
if (query == null) {
return cursor
}
val results = layerManager!!.getObjectNamesMatchingPrefix(query)
val results = layerManager.getObjectNamesMatchingPrefix(query)
Log.d("SearchTermsProvider", "Got results n=" + results.size)
for (result in results) {
cursor.addRow(columnValuesOfSuggestion(result))
Expand Down
Loading